At what revision does the branch branch from the trunk? You normally
merge from "-r branch_point:HEAD" to the branch.
trunk: revisions 1:91.
branch: branched from revision 40 of trunk.
You would then 'svn merge -r 41:91 svn://server/repos/trunk' to a branch
You can find the branch point by running:
svn log --stop-on-copy -v svn://server/repos/branch
The last entry will list something like: A /branch (from /trunk:40)
40 would be the branch point.
However, this assumes that you created your branch by doing a 'svn copy
svn://server/repos/trunk svn://server/repos/branch'. 'svn copy' will
preserve the lineage. If you didn't use svn copy, then the merge
becomes much more manual, since the two directory trees are unrelated.
You will need to use 'svn merge --ignore-ancestry' or just use a normal
diff tool to do the merge.
If you still think you're missing code from revisions, then it's going
to be difficult to track the problem down since you're new at merging,
and Subversion's merging paradigm is a tad different.
Also what version of Subversion are you using (svn --version)?
From: Negron, Carlos [mailto:email@example.com]
Sent: Tuesday, September 26, 2006 4:56 PM
To: Reedick, Andrew; Negron, Carlos
Subject: RE: RE: Merge issues
Sorry I misworded my last email. This is what I am trying to
I am trying to merge revision 1 of my trunk into my working
This is what I have done:
svn merge -r 1:91 file:///trunk
I don't get the desired results. I am missing the lines of code
in revision 1 and 91.
Thanks so far as I am getting a better understanding here.
Any thoughts on this?
From: Reedick, Andrew [mailto:Andrew.Reedick@BellSouth.com]
Sent: Tuesday, September 26, 2006 1:36 PM
To: Negron, Carlos
Subject: RE: RE: Merge issues
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
merge -r 100:123 svn://.../branch (or merge
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
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
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
Please access the attached hyperlink for an important electronic
Received on Tue Sep 26 23:25:24 2006