[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-26 22:55:47 CEST

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
==============================================================================
Received on Tue Sep 26 22:56:55 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.