Login | Register
My pages Projects Community openCollabNet

Discussions > users [DISABLED] > RE: Branch / merge issue - bug or working as intended?

subversion
Discussion topic

Back to topic list

RE: Branch / merge issue - bug or working as intended?

Author emiller
Full name Eric Miller
Date 2009-11-12 09:17:54 PST
Message Bob-

Thanks, --reintegrate fixed the issue.

Eric

> -----Original Message-----
> From: Bob Archer [mailto:Bob dot Archer at amsi dot com]
> Sent: Thursday, November 12, 2009 10:15 AM
> To: Miller, Eric; users at subversion dot tigris dot org
> Subject: RE: Branch / merge issue - bug or working as intended?
>
> > I'm playing around with some branching strategies and I'm getting
> > merge
> > conflicts where I don't expect to see them.
> >
> > Basically I'm just trying to push some trivial, non-conflicting,
> > edits
> > back and forth from trunk to a branch:
> >
> > 1. create branch
> > 2. edit on trunk, commit
> > 3. merge trunk changes to branch, edit on branch, commit
> > 4. merge branch changes to trunk:
> > Conflict discovered in 'afile'.
> > Select: (p) postpone, (df) diff-full, (e) edit,
> > (mc) mine-conflict, (tc) theirs-conflict,
> > (s) show all options: dc
> > initial file
> > <<<<<<< MINE (select with 'mc') (2)
> > trunk modification
> > ||||||| ORIGINAL (2,0)
> > =======
> > trunk modification
> > additional branch modifications
> > >>>>>>> THEIRS (select with 'tc') (2,2)
> >
> > Can someone tell me if this is a bug or just a problem with the way
> > I am
> > using svn?
>
> If you are not specifying a rev range for the merge then it is taking
all
> the changes on branch and merging them back to trunk. But, since you
> merged in truck that diff from the branch will include the changes you
> made from trunk. Here from the 1.4 svn book:
>
> " At some point, you'll be ready to merge the "synchronized" feature
> branch back to the trunk. To do this, begin by doing a final merge of
the
> latest trunk changes to the branch. When that's done, the latest
versions
> of branch and trunk will be absolutely identical except for your
branch
> changes. So in this special case, you would merge by comparing the
branch
> with the trunk:"
>
> 1.5 added merge tracking and it will do the above for you
automatically
> when you merge back to branch but you need to specify --reintegrate...
>
> BOb
>
>
>
> >
> > Below is a simple shell script to demonstrate the issue. I've
> > tried
> > 1.6.3 and 1.6.5.
> >
> > Thanks,
> > Eric
> >
> > #!/bin/sh
> >
> > rm -rf tmp; mkdir tmp; cd tmp
> >
> > repos=`pwd`/repos
> > svnadmin create repos
> > svn co file://$repos wc
> > cd wc
> >
> > mkdir trunk branches
> > echo "initial file" > trunk/afile
> > svn add trunk branches
> > svn ci -m 'init'
> > svn switch file://$repos/trunk
> >
> > svn cp file://$repos/trunk file://$repos/branches/A -m 'Create
> > Branch A'
> >
> > echo "trunk modification" >> afile
> > svn ci -m 'trunk modification'
> >
> > svn switch file://$repos/branches/A
> > svn merge file://$repos/trunk
> > echo "additional branch modifications" >> afile
> > svn ci -m 'Merge updates from trunk with branch modifications'
> >
> > svn switch file://$repos/trunk
> > svn merge file://$repos/branches/A
> >
> > --------------------​--------------------​--------------
> > http://subversion.ti​gris.org/ds/viewMess​age.do?dsForumId=106​5&dsMes
> > sageId=2417144
> >
> > To unsubscribe from this discussion, e-mail: [users-
> > unsubscribe@subversi​on.tigris.org].

« Previous message in topic | 3 of 3 | Next message in topic »

Messages

Show all messages in topic

Branch / merge issue - bug or working as intended? emiller Eric Miller 2009-11-12 08:57:25 PST
     RE: Branch / merge issue - bug or working as intended? pilotbob Bob Archer 2009-11-12 09:15:04 PST
         RE: Branch / merge issue - bug or working as intended? emiller Eric Miller 2009-11-12 09:17:54 PST
Messages per page: