简体   繁体   中英

How to SVN Merge

I am having trouble with a subversion merge I've done before, and my local help is not around...so I was hoping someone here might be able to help. Yes I've read the docs, I want a human response because this merge is very important.

I am trying to merge from branch123 to branch124, which was branched directly off branch 123. my merge command is:

svn merge -r 18089:HEAD  svn+ssh://my.private.url/usr/local/svn/myappname/branches/123/ .

here the current directory is a freshly checked out copy of branch124. revision 18088 was the previous revision which brought branch124 up to date.

The results of the merge seem to be clearing out changes that have been made in branch124 since the previous refresh. Is the syntax wrong? Is there something else wrong?

My mental model for simplifying svn merging is to treat it like a diff->patch.

For example, if you are merging 123 into 124, then doing a

svn diff -r 18089:HEAD svn/myappname/branches/123

Should give you a diff of what should be altered in your target path that you intend to patch/merge. Examine it very closely to make sure it isn't removing things you want to remain in 124.

If the diff looks correct, proceed to merge it like you tried with:

svn merge -r 18089:HEAD svn/myappname/branches/123 svn/myappname/branches/124

Which is just the previous command except diff becomes merge and you append the target directory of the merge at the end of the commmand

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM