simple:
1. View branch information
Of course, the target branch must be downloaded before merging! ! !
cd the directory to the branch directory (branch)
1. Run svn info:
The only useful information: URL (branch svn address)
svn://192.168.1.80:3698/C/branches/pirate/rpcfw/specialactivety
2. Run
svn log --verbose --stop-on-copy | tail -10
The only thing that works: the version number when the branch was created (r17888)
2. Merge and divide into the trunk
cd the directory to the trunk directory (trunk)
1. Run svn update:
View the latest version number of the repository (18665)
2. Run svn merge:
svn merge svn://127.0.0.1/repos/main
svn merge -r 17888:18665 svn://192.168.1.80:3698/C/branches/pirate/rpcfw/specialactivety
- Left: initial version tree
- Right: target version tree
Many options pop up, choose postpone to delay conflict resolution
3.svn revert:
If there is an error in the merge, revert can undo the merge
3. Conflict resolution
1. Run svn status: view merged information
2. Conflicting files will generate four files
filename.merge-left.r18665 filename.merge-right.r17888 filename.working filename
3. Modify the conflicting part in the filename file
4. Run svn resolved filename to delete the generated redundant files
5. Submit a commit
svn commit -m "test" // commit
Fourth, create a branch command:
Go to the upper directory of the main directory -- "Add the main folder: svn add ./dev
Create a branch: svn copy svn://127.0.0.1/repos/dev svn://127.0.0.1/repos/branch -m "test"
Check status: svn log -v ./branch/test.php
Notice:
a), creating a branch can only be done within the same warehouse, not across warehouses. will prompt:
svn: No repository found in 'svn://127.0.0.1'
b), when creating a branch, pay attention to add a comment, otherwise the following error will be reported.
[root@BlackGhost repos]# svn cp svn://127.0.0.1/repos/main svn://127.0.0.1/repos/branch svn: Could not use external editor to fetch log message; consider setting the $SVN_EDITOR environment variable or using the --message (-m) or --file (-F) options svn: None of the environment variables SVN_EDITOR, VISUAL or EDITOR are set, and no 'editor-cmd' run-time configuration option was found