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

RE: Help with constant conflicts

From: Bob Archer <Bob.Archer_at_amsi.com>
Date: Fri, 13 May 2011 11:33:08 -0400

> On Fri, May 13, 2011 at 4:35 PM, Stephen Butler <sbutler_at_elego.de>
> wrote:
> >
> > On May 13, 2011, at 13:41 , K.L. wrote:
> >
> >> Hi,
> >>
> >> Having problems with merge.
> >
> > [...]
> >
> >> me_at_localhost /srv/www/svnbugs/branches/branch1 $ svn merge
> >> svn+ssh://example.com/var/svn/svnbugs/trunk
> >> --- Merging r4 through r5 into '.':
> >> A    dir2
> >
> > [...]
> >
> >> me_at_localhost /srv/www/svnbugs/trunk $ svn merge
> >> svn+ssh://example.com/var/svn/svnbugs/branches/branch1
> >> --- Merging r4 through r7 into '.':
> >>   C dir2
> >> A    dir3
> >> Summary of conflicts:
> >>  Tree conflicts: 1
> >> me_at_localhost /srv/www/svnbugs/trunk $ svn st
> >> M      .
> >>      C dir2
> >>>  local add, incoming add upon merge
> >> A  +    dir3
> >
> > [...]
> >
> >> Is it a bug or we issue wrong commands?
> >>
> >
> > The second merge was wrong.  To merge branch1 changes back to
> > the trunk, use 'merge --reintegrate ^/branches/branch1'.
> >
> > See the section "Reintegrating a branch" in the SVN Book:
> >
> >  http://svnbook.red-
> bean.com/nightly/en/svn.branchmerge.basicmerging.html#svn.brancheme
> rge.basicmerging.reintegrate
> Thanks. We used reintegrate option occasionally without knowing its
> true purpose and assuming it's default when merging into trunk.

No it isn't default. svn doesn't know if you are merging into trunk... and trunk is just a convention.

I suggest you read the merging/branching chapter in the svn book. It really helps to understand how things work if you want to use it effectively.

> I've also read that svn 1.6 allows for multiple reintegrates. Can
> you
> confirm it? Do multiple reintegrates completely equivalent to
> delete
> and copy if so?

No... read the book on continuing to use a branch after re-integration. It is possible but you have to be pro-active to allow it by doing a --record-only merge from trunk of the revision which is the commit of the merge from the branch.

> And is it safe to recreate branch with the same name as deleted?

Sure... not a problem.

Just keep in mind you know the semantics of your branch.

If it is a feature branch you are going to generally merge from trunk as you work on the feature and then reintegrate the branch when you are done with the feature. Since you are done with the feature you [normally would] delete the branch.

BOb
Received on 2011-05-13 17:33:37 CEST

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.