When you merge, you do not specify the TARGET branch in the merge
command. Your workspace is your TARGET branch.
verA and verB always refer to the SOURCE branch.
verA is the starting revision of the SOURCE branch. verB is the ending
revision on the SOURCE branch. You are merging a range of changes
(revisions verA:verB) from the SOURCE branch to your workspace. Your
workspace is the TARGET branch.
This is wrong:
svn merge svn://.../branch_at_100 svn://.../trunk_at_123
This is correct:
svn co svn://.../trunk merge2trunk
svn merge svn://.../branch_at_100 svn://.../branch_at_123
svn merge -r 100:123 svn://.../branch
... resolve conflicts ...
svn commit -m "merge -r 100:123 svn://.../branch"
For your first merge from branch to trunk, verA will be the 1st revision
on the SOURCE branch. verB will be the HEAD of the SOURCE branch. Ex:
merge -r 100:123 svn://.../branch (or merge svn://.../branch_at_100
You next merge from branch to trunk will be:
merge -r 124:150 svn://.../branch (assuming that 150 is the new
HEAD of the branch.)
Also, never use HEAD for a merge. Instead use a specific revision
number. This is critical for merge tracking purposes. Read up on
manual merge tracking in Subversion (you put the merge command in the
If you ever find yourself specifying the TARGET branch in the merge
command, then you're doing something wrong.
From: Negron, Carlos [mailto:email@example.com]
Sent: Tuesday, September 26, 2006 1:16 PM
To: 'Lakshman Srilakshmanan'; Negron, Carlos
Subject: RE: Merge issues
Thanks for you reply. I read the link and got a deeper
understanding of how "svn merge -r <num>:<num>" would work.
So it partially answered my question. Also the link focused on
using some tool, I am using the command line on Unix.
You see I understand this syntax: svn merge <url>@verA
Based on the link below command will take files verA and compare
them to verB. This issue I found with this type of
merge is, for example: verA of file foo.c has lines of code I
want to keep. verB has new functionality but does not
have the code I want to keep from verA. So I want to merge.
Thus when I do a merge the code that I want to keep
gets deleted. I would at least expect a conflict. Also my
working repository is the branch that contains verB.
This also happens vice versa.
What I don't understand is this syntax: svn merge -r verA:verB
Can you clarify this syntax as the documentation clearly
explains the -r options but not what the url@ver indicates?
Please let me know.
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential, proprietary, and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from all computers. GA624
Received on Tue Sep 26 19:38:29 2006