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

Re: Confusion over the 3 merge forms

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2004-11-19 19:00:25 CET

On Nov 18, 2004, at 3:53 PM, pkahn@connected.com wrote:

> I have some merging questions:
>
>  
>
> According to the help for the svn merge command there are three forms:
>
> usage: 1. merge sourceURL1[@N] sourceURL2[@M] [WCPATH]
>
>            2. merge sourceWCPATH1@N sourceWCPATH2@M [WCPATH]
>
>                        3. merge -r N:M SOURCE[@REV] [WCPATH]
>
>  
>
> The third form or Ranged Merging seems useful and is what we use here
> all the time.  I haven't seen forms 1 or 2 be of much use.  I didn't
> even notice them in the red bean book.  Does any one know for what use
> case they were designed?
>

Form #1 is the "true" form of merge; form #3 is just a shorthand for
it.

Forms #1 and #2 are useful when you want 'svn merge' to compare two
different URLs. Most of the time, the URLs are the same. (For
example, when merging all branch changes to trunk.) But there are
times when the URLs aren't the same.

For example, I'm working on a 'locking' branch right now. In order to
keep it sync'd with ongoing trunk changes, every week or so I run 'svn
merge -rX:Y trunkURL' into my branch working-copy, then commit.
Eventually I'm going to want to merge my branch changes back into the
trunk. At that moment, my branch already be a combination of all trunk
changes and all branch changes, so my final merge command will be

    $ svn checkout trunkURL trunk; cd trunk
    $ svn merge trunkURL branchURL

By comparing trunk directly with the branch, I'll get a patch that
describes just the branch changes.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Nov 19 19:02:24 2004

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.