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

Re: How does 'merge' work?

From: Karl Fogel <kfogel_at_newton.ch.collab.net>
Date: 2002-10-21 18:12:17 CEST

Philip's absolutely right -- I wasn't thinking straight in my original
response :-).

Dmitry, you can't get a conflict if you don't have local mods. No
matter how distant the branch is from the original file, there is
still a diff that can represent that distance -- only if the local
target of the merge *also* had local mods could you get a conflict.

Thanks, Philip.

-K

Philip Martin <philip@codematters.co.uk> writes:
> This has come up before :)
>
> The first two arguments, dir and dir_branch, define the merge source,
> the third argument, dir_branch, defines the merge target. Although
> you have used working copy paths to specify the merge source, merge
> always uses URLs, so the working copy paths are used only to extract
> an URL, the contents are ignored. The current Subversion now gives
> an error and requires you to specify URLs in this case.
>
> The merge command above gets a patch representing the difference that
> will convert the first URL (dir) into the second URL (dir_branch), and
> then applies that patch using a three-way diff to dir_branch. If you
> have no local changes to dir_branch, then the three-way diff will
> determine that the patch has already been applied and so you see the
> above output.
>
> >
> > 5b. svn merge dir_branch dir dir_branch
> > ---> U dir/a.txt
>
> In this case merge gets a patch representing the difference that will
> convert dir_branch into dir, and applies that using a three-way diff
> to dir_branch. If you have no local changes this will apply without
> conflict and your dir_branch working copy will now look like dir.
>
> My guess is what you really want to run something like
>
> $ vi dir/a.txt
> $ svn ci dir
> Sending dir/a.txt
> Committed revision 423.
> $ svn merge -r422:423 dir dir_branch
>
> This merge gets a patch that represents the changes made to dir and
> then uses a three-way diff to apply the patch to dir_branch. Whether
> you get conflicts depends on what you have done to dir_branch since
> you copied it.
>
> --
> Philip Martin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Oct 21 18:42:03 2002

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

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