[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: RE: Merge issues

From: Negron, Carlos <carlos.negron_at_credit-suisse.com>
Date: 2006-09-27 00:14:03 CEST

I've done this also.
 
Here are the steps I took:
 
cd my_branch
svn log --stop-on-copy
 
Last line is version 48 so I execute...
 
svn merge -r 48:91 file:///trunk <file:///trunk>
 
This picks up some changes but not the changes from revision 1 off the trunk.
Pay in mind that the trunk is up to revision 88 as the latest, I only want revision 1 changes.
 
For example, I do a diff on a file from revision 1 and in my working repos and it shows
allot of differences, yet this merge doesn't show any work being done. I expect at
least a conflict...
 
Any thoughts on this?

  _____

From: Reedick, Andrew [mailto:Andrew.Reedick@BellSouth.com]
Sent: Tuesday, September 26, 2006 5:19 PM
To: Negron, Carlos
Cc: users@subversion.tigris.org
Subject: RE: RE: Merge issues

At what revision does the branch branch from the trunk? You normally merge from "-r branch_point:HEAD" to the branch.
 
Example:
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 workset.
 
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:carlos.negron@credit-suisse.com]
Sent: Tuesday, September 26, 2006 4:56 PM
To: Reedick, Andrew; Negron, Carlos
Cc: users@subversion.tigris.org
Subject: RE: RE: Merge issues

Sorry I misworded my last email. This is what I am trying to do:
 
I am trying to merge revision 1 of my trunk into my working branch.
 
This is what I have done:
 
cd my_branch
svn merge -r 1:91 file:///trunk <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
Cc: users@subversion.tigris.org
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
        cd merge2trunk
        svn merge svn://.../branch_at_100 svn://.../branch_at_123
            -or-
        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 svn://.../branch_at_123)
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 commit comment.)
 
 
If you ever find yourself specifying the TARGET branch in the merge command, then you're doing something wrong.
 

  _____

From: Negron, Carlos [mailto:carlos.negron@credit-suisse.com]
Sent: Tuesday, September 26, 2006 1:16 PM
To: 'Lakshman Srilakshmanan'; Negron, Carlos
Cc: users@subversion.tigris.org
Subject: RE: Merge issues

Lakshman,
 
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 <url>@verB
 
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 url@ver <mailto:url@ver>
 
Can you clarify this syntax as the documentation clearly explains the -r options but not what the url@ver <mailto:url@ver> indicates?
 
Please let me know.
 
thanks
Carlos

*****

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 communications disclaimer:

http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html

==============================================================================

==============================================================================
Please access the attached hyperlink for an important electronic communications disclaimer:

http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
==============================================================================
Received on Wed Sep 27 00:14:54 2006

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.