svn management tool

1. What is svn?

             Svn is used for code management. Using svn, you can upload the code to the svn server. If you want to use the code, you can download it from the svn server, and you can implement functions such as update, upload, and submission.

              If there is a version conflict during the submission process, the submission will fail. He will download the code to the local warehouse, proofread it with the code in the server, and update it, so that the version will be one higher than the previous version, and then submit it. success

2. svn server installation and configuration

    2.1 Official installation package

           

Official website: http://subversion.apache.org/

Download: http://subversion.apache.org/download.cgi

    

    

    

    View program menu:

     

     Check the service, VisualSVN started successfully

      

      

    2.2 Create warehouse

   After the svn server is created, a warehouse needs to be created, and the files to be version controlled are stored in the warehouse.

    Enter VisualSVN server manager through the start menu:

       

      

     

     

   Select the file storage method:

     

     

      Create an empty repository

       

       

       Set user access permissions to the warehouse:

      

     

      Warehouse created successfully:

     The warehouse address is https://ip address or computer name/svn/warehouse name

     

       

   

     2.3 Create project directory

                 To store development project codes, documents, etc. in the warehouse, a project directory needs to be created.

            

            

           Created successfully:

            

           

trunk: The main body of the project development code is active from the beginning of the project until now, from here you can get the latest source code of the project and almost all the change history information.

branch: A copy of the code separated from a certain point of the trunk. Usually, major bug modifications, experimental development, and custom function development can be performed here without affecting the trunk. If the branch has achieved its intended purpose, it can usually be merged (Mgerge) into the trunk.

tag: used to indicate the state of a certain point of trunk and branch, to represent a stable state of the project, usually the final release state.


         

        The project directory is created, check its svn address:

        

        

          Copy the svn address:

         

        Authorization

         

         Login test for read/write permissions

         

          clear authentication cache

                  There are several situations where the authentication cache needs to be cleared:

                          1. Use multiple accounts to log in locally, and the account and password entered each time are different

                           2. When the account password is changed (recommended cleaning)

              

              

3. svn additions, deletions and modifications

      1. checkout (check out)

          Check out the project, copy a copy of the project to local (disk).

          Right click in the directory to be checked out:

           

            

         2. add (add)

             Add files in the checked out directory:

           

         

               Add to ignore list : Add to ignore list (marks that the file does not require version control)

              

            

               Add: mark this file to be added to the server has been marked to be added to the repository    

              

     3. commit (submit)

         When the content in the checked out directory or subdirectory has been modified, submit Commit to submit the local modification to the svn server: right click on the checked out directory or the directory to be modified:

               

               

                

                After submission, the content in the directory is synchronized with the svn service

   4. update (update)

              Update the files in the warehouse to the local, right-click on the checkout directory or sub-target or file:

               

                (1) Update to the latest version

                 

                 (2) Update to the specified version

                  

                      

            5. delete (delete)

                         Delete : delete the repository file

                 

                    After the mark is deleted, the local file is deleted, and it needs to be submitted after the mark is deleted.

            6. Recovery

                   The operation log will be recorded in the checkout directory or subdirectory operation, and the operation can be rolled back before submission. Right click in the checkout directory or subdirectory to be rolled back:
                    

                      

         (7) Conflict handling

                   Two clients modify the same file at the same time, change the same location, and a conflict occurs

                   If the file is already outdated when commit encounters, it means that another person may have changed it ----- so update first, and then commit

                      

                              db.properties merges the local and server files (do not look directly)

                              db.properties.mine My local modified file

                              db.properties.r16 I modified the previous file

                               db.properties.r17 files modified by others

                      After manual Merge, you need to mark the edited conflict file as resolved, and then commit 

4. Using the SVN plug-in of eclipse

                  Download the eclipse plug-in of Subversion 
                             http://subclipse.tigris.org/servlets/ProjectProcess?pageID=p4wYuA 

                  download site-1.10.11.zip, this tutorial put this zip on the D drive.

                   The following are the steps to install the svn plug-in on STS:

     1. Enter the STS software installation interface

                 

          

      2. Install the svn plugin

                  

                  

                         Enter the above command line: SVN - jar:file:/d:/site-1.10.11.zip!/

                         Click Next.

                  

                   

                   

                   

                     When prompted, choose to continue with the installation:

                   

                       

                         The installation is complete, and the STS view has the SVN option, indicating that the installation is successful:

                       

             

Guess you like

Origin blog.csdn.net/Wang_kang1/article/details/80781214