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

Re: Question regarding merging branches

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2002-09-06 16:19:06 CEST

Ben Collins-Sussman <sussman@collab.net> writes:

> "Dylan Cuthbert" <dylan@q-games.com> writes:
>
> > I get this when I do a merge:
> >
> > $ svn merge http://svnserver/svn/repo/branches/test-branch/projects . <=
> > note the "."
> > _ Makefile
>
> Hmmmm, it looks like you issued the command correctly. Was your

The merge command above takes three arguments, only two were
explicitly stated so a dot "." was implied as the third, giving

$ svn merge BranchURL . .

The second argument gets converted into an URL giving

$ svn merge BranchURL TrunkURL .

Now this will try to apply the changes between the first and second
arguments, BranchURL and TrunkURL, to the third argument, dot. If the
file in the current directory (in dot) is unmodified, then this merge
is trivial and has no effect. If the file in dot happened to look
like the file BranchURL, it would get transformed into a file like
TrunkURL.

> Makefile changed at all? Run 'svn diff Makefile' to see if it
> received any changes. I suspect that you should have seen an "M"
> instead of a "_" during the merge, and it may just be a display bug.
>
> > Shouldn't I get a conflict to fix?
>
> You should only get a conflict if the Makefile in your working copy
> has *local mods* that conflict with the difference that 'svn merge' is
> trying to fold in. If your working Makefile is unchanged, then poof,
> the differences between the two files will be applied without a
> problem; you'll end up with a Makefile that looks identical to the
> one on the branch.

No, you end up with a Makefile that looks like the one in the current
directory, it's merging a BranchURL-to-TrunkURL diff. You are correct
that a local uncommited change to the file in dot that conflicts with
the BranchURL-to-TrunkURL diff will cause a conflict.

I suspect the command Dylan wants to run is

$ svn merge -rN:M http://svnserver/svn/repo/branches/test-branch/projects .

where N and M are the revisions before and after the branch change.
This will merge the change made on the branch into the trunk. A merge
command using -rN:M only has two arguments becauee the two revisions
combine with the first argument to provide two URLs.

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Sep 6 16:19:46 2002

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