SVN terminal Walkthrough (Personal development \ Multi-person development)

Source: Internet
Author: User
Tags svn update

SVN terminal Walkthrough (Personal development)

# # 1. Command format command-line format: SVN <subcommand> [Options] [args] SVN subcommand [options] [parameters] where the contents of the brackets inside can be omitted
# # 2. Must learn command SVN [subcommand]--help svn help [subcommand]
# # 3. Practical Walkthrough
1. Project manager initializes the project and uploads it to the SVN server

Scenario 1:
(1) Create a temporary project (after uploading, the file can be deleted)
(2) SVN import [path] URL--username= user name--password= password-m "comment"

Scenario 2:
(1) SVN checkout URL [path]--username= user name--password= password: Initialize the local repository
(2) Create a project
(3) Add all project files to local version control using the SVN add command
(4) Commit the local project to the remote server using SVN commit


2. Program ape Download a full code from the server to start the development on-premises

SVN checkout URL [path]--username= user name--password= password

3. Modify file Submission

(1) Modify the file
(2) Use svn commit-m "comment": Submit local file to server

4. New File Submission

(1) New file
(2) Add all project files to local version control using the SVN add command
(3) Use svn commit-m "comment": Submit local project to remote server

5. Delete file submission

* Always do not delete files manually *

(1) SVN remove filename or svn delete filename from local version control and corresponding file deletion
(2) SVN commit-m "comment": Submit the local action to the server, so that the server also deletes the corresponding file

6. Common Command Additions

1. SVN status
View the status of all changed files within the current workspace
If you execute this command, nothing is output, so there is nothing to commit locally.
2. SVN log
View the current version of the action log (what person, what time, what action was done)

7. Version control, individual file status reference

"No Modification
' A ' is added to the local code repository
' C ' conflict
' D ' was deleted (Files deleted by SVN command)
' I ' is ignored
' M ' was modified
' R ' is replaced
' G ' was merged
' U ' has been updated
' E ' already exists
' X ' external definition of the created version directory
'? ' file is not added to the local repository
'! ' file is missing or incomplete (not files deleted by SVN command)
"Controlled file blocked by other files

8. Precautions
* Any local operation, if you want the server to do the same operation, directly through the commit operation submitted to the server
* Any actions submitted to the server are annotated with the add-m parameter SVN terminal Walkthrough (Multi-person development)0. Preparatory work

Bear and Kumaji, respectively, through
SVN checkout URL [path]--username= user name--password= password
command to initialize the local version control library


1. Add File synchronization

1. Bear big create file and submit to server
SVN add FileName
SVN commit-m "Add Files"
2. Kumaji update files from the server
SVN update

2. Modify File synchronization

1. Bear big change file and submit to server
SVN commit-m "Modify File"
2. Kumaji update files from the server
SVN update

3. Delete file synchronization

1. Bear Big Delete file and submit to server
SVN Delete FileName
SVN commit-m "Delete Files"
2. Kumaji update files from the server
SVN update

4. Common problems in multi-person co-development

* Problem One: timeout
Problem Description:
When the local file version is smaller than the server file version, the out of date time-out error is reported if the local file is to be submitted
Cause:
SVN manages each file through the version number, if a file is modified and submitted to the server, then the corresponding file version number on the server will be added 1, if your version number is smaller than the server version number, it is certain that someone else later modified the file
Solution:
For the time-out problem, the corresponding solution is to update the latest version from the server, to ensure that the local version number and server version number is consistent, this is the premise of the file can be submitted

* Question two: conflict
Problem Description:
In order to resolve the time-out problem, only update is possible. During the update process, if several people modify the same line of code for the same file, a conflict occurs
Cause:
The version controller is not so smart, to decide who should use the code as the final code, can only throw the choice to the user, let the user solve
Solution:
The system offers three solutions:
(p) Postpone,
Deferred processing (I'll handle it myself), if you choose this one, three files are automatically generated for the user to refer to the decision. And merge the conflicting parts of the code block together. Once resolved, the SVN resloved fileName needs to be executed to tell the version controller that it has been resolved, and then the version controller will automatically delete the three reference files.
(MC) Mine-conflict
Using my (local), if the code conflicts, the local code will prevail
(TC) Theirs-conflict
Using someone else's (server), if the code conflicts, the server code is the subject of the

SVN terminal Walkthrough (Personal development \ Multi-person development)

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.