SVN client User Manual (Full Version)

Source: Internet
Author: User
Tags svn client

This document will gradually teach you how to use SVN during software development
Client

I. Basic operations

Step 1: Install the client

Go to the shared folder and download the TortoiseSVN-1.4.0.7501-win32-svn-1.4.0.msi
Install the program by double-clicking it. After the installation is successful, right-click the mouse and there will be two more options, SVN checkout
And tortoise SVN
.

Step 2: Create a workspace

Before the project starts
To create a folder named randomly (such as workspace

.

Step 3: Download the version Library

If a project is developed, the configuration administrator creates a version library test for the project on the server.

In workspace
Folder, right-click the mouse. Select SVN checkout
, The following window appears:


In the URL of repository
Enter the version library address, http: // 10.155.11.10: 81/SVN/test
In the checkout dir
The workspace directory created in step 2 is automatically added.

In Revision
Select head Revision
In this way, the latest version of the version library will be downloaded. If you want to download the old version of the library, select revision.
And enter the version number.

If you do not want to download the entire version library, but want to download the part of the module that you are responsible for, you can
Add the module name, for example, http: // 10.155.11.10: 81/SVN/test/Doc.
.

Click OK
, Enter the user name and password

Step 4: Modify the version Library

Modifications to the version Library include modifying the file content, adding and deleting files, and adding and deleting directories.

After step 3, the local workspace folder, that is, workspace
There will be a green check, and the files in the work area will also have a green check,

2

Figure 2

If a file in the database is modified, the system automatically adds a red exclamation mark to the file and its parent folders at all levels, indicating that the file or directory has been modified locally. 3


Figure 3

After modifying the version library, right-click the workspace folder and choose commit
Submit the new version. After you enter the password, the system will upload the modified version Library to the server. This completes an update of the version library.

Note:

After the new version is submitted, other users with write permission may repeat the preceding steps to update the version library. Therefore, before modifying the local version library in the workspace folder, you must update the local version Library (right-click the workspace and select SVN updata
), Download the latest version to the local device, and then modify the version.

Ii. Other operations

In the daily software development process, in addition to the download, submission, and update operations described above, there are also several common operations.

(1
) Compare the differences between files.

When
After modification, soc_1
The file will be marked with a red exclamation mark, indicating that it has been modified. If you want to view the modified soc_1
The file is different from the one before modification. You can right-click the file and select diff
, The system returns a window, 3
The window is divided into two parts: the version before the change on the left and the version after the change on the right. Mark and describe the differences. 4

 


For word
Document, select diff
The system opens
Document, and mark the differences between the modified version and the version before the modification. 4.1


 

(2
) View logs

To view the logs of a file, such as soc_1
Right-click the file and choose show log
, The system will step out a window and show soc_1 in the window
Logs of different versions
. 5


 

Figure 5

(3
) View the version tree

To view soc_1
File version tree, right-click the file, and select Revision graph
The system opens a window and displays the version tree of the file. 6
.


 


Only 4.5.6 is displayed.
. 7
The four versions are selected because only the changed versions are displayed. 1.4.5.6.7
Each version is different and submitted after modification. While 2.3
The two versions are different from version 1.
Same.

(4
Download the old version of an object.

To get the old version of a file, right-click the file and select Updata to revision...
You can. The system prompts you to enter the version number. For example, to download soc_1
In version 5
You can. 7
. Check version 5
To return to the latest version, you only need
Run Updata
You can.


 

(5
) Duplicate name and delete file

If you want to delete a file or rename a file,

Do not go to windows
. Right-click the file and select Rename
Or Delete
, Svn
The system will complete the operation.

In workspace
After the file is renamed or deleted, the file structure on the server will not change. Only after the new version library is submitted, that is, commit
Then, the file structure of the server will be updated.

If the file is deleted by mistake, you can re-download the file to the local version library by upgrading the version library before submitting the version library. You can also use the revert
Restore (refer to Article 8 ). If the file is deleted and submitted, you can only download the old version library to retrieve the file. For more information, see (4
).

(6
) Create a branch

The original files soc_1, soc_2, word_1, and word_2 in the version Library
Are all trunk files. If you want
To create a branch, right-click soc_1
, Select Branch/Tag
, The system will pop up a window, 8
. In the window, From URL
Indicates that the branch to be created is soc_1
). In the To URL
, You need to change the file name, add a flag after the file name, such as"
_ Branch"
, The path does not need to be changed. In Creat copy in the repository from
, You can select the Branch file from soc_1
. Enter the log and select OK.
.


 

Branch created, Updata
Version library, the system will
The main file and Branch file soc_?branch
Download to the local version library, 8.1
And then you can operate on the Branch file. Soc_1
Build tree 8.2


 

(7
) Merge Branch

When you need
Merge Branch files to soc_1
Right-click soc_1
, Select Merge
, A window will pop up, 9
.


 

In the from
Enter the URL of the master node in the input box.
In the
Enter the branch URL in the input box.
. In the from
And
, Both have two options head Revision
And revision
To merge soc_1
. After merging, the main file is marked with a red exclamation mark, indicating that the file has been modified and can be submitted. If the merged file is marked with a yellow exclamation mark, it indicates a file conflict. For details, see section 3"
Exception Handling"
.

(8
) Undo Modification

After a file is modified and saved (note that it is not submitted here), if you are not satisfied with the modification and want to modify it again, right-click the modified file (the one with a red exclamation mark) and select revert
, The previous changes will be undone and restored to updata.
Status. If a file is accidentally deleted, you can right-click the directory where the file is located and select revert
.

Iii. Exception Handling

The exception mentioned here mainly refers to a file conflict. Deva
And user DEVB
For example,

When two users download the latest version library and
Deva
No exception occurs. The second submitted user
DEVB
You will be unable to submit. Because the server version library has been Deva
Update, DEVB
When a user uploads a file, the system will prompt 10 errors
.


 

 

In this case, DEVB
You must first updata the modified file.
File Operations. If two users modify the file soc_2
In the DEVB
User executes updata
After
Download soc_2 from the server
Merge to a file and place a yellow exclamation mark on the file icon to indicate a file conflict. In the file"
And ">>>>>"
Identify the conflict location and content. DEVB
Users only have
Negotiate, process the conflict, right-click, and select resolve
, The conflict mark is eliminated before it can be submitted again, otherwise it cannot be submitted.

File tag conflict format:

<. Mine

Workspsace
Workspace, etc. ABC
After the workspace is submitted, a conflict may occur.
 

========


Insert a paragraph here, Ah aaa
, Test conflict

>>>>>>>. R15

The green part indicates the modification of the local file.

The blue part indicates the conflict between the latest version in the server version library and local file modification.

Purple indicates 15th
Versions conflict

========


Insert a paragraph here, Ah aaa
, Test conflict

>>>>>>>. R15

The green part indicates the modification of the local file.

The blue part indicates the conflict between the latest version in the server version library and local file modification.

Purple indicates 15th
Versions conflict.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.