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

unexpected conflict merging branch into trunk (after merging trunk into branch)

From: Darin Kelkhoff <dkelkhoff_at_materialogic.com>
Date: 2007-03-22 14:48:41 CET

I'm getting an unexpected conflict when trying to merge from trunk into a
branch, then back into trunk again. I'll accept that perhaps I'm not using
my branches quite correctly, though I'm following the examples I've seen as
well as I can understand them.

To summarize (a transcript of shell session is below), I've created a branch
as a copy of trunk, then added a file in trunk, then modified and commited
the file in trunk, then merged trunk into the branch, modified the file in
the branch, then tried to merge the branch back into trunk. This branch
into trunk merger is where the conflict happens.

Maybe there's something obvious that I'm missing, or like I said, maybe I'm
missing some key point in how to manage branches. Either way, any help
would be greatly appreciated.

> svn --version
svn, version 1.4.2 (r22196)

Transcript which should be able to reproduce this issue:

## First I created a new branch:
> svn copy -m "Creating test branch" svn+ssh://mldev/TRAINING/trunk/ \
Committed revision 223.

## Then, in a working-copy of trunk, I added a new file,
training/trunk> touch myNewFile
training/trunk> svn add myNewFile
A myNewFile
training/trunk> svn commit -m "Initial checkin" myNewFile
Adding myNewFile
Transmitting file data .
Committed revision 224.

## Then in trunk I edited that file, and commited it again:
training/trunk> echo "This is added in trunk" >> myNewFile
training/trunk> svn commit -m "Updated in trunk" myNewFile
Sending myNewFile
Transmitting file data .
Committed revision 225.

## Then, I merged trunk into the new branch:
training/test_merge> svn merge -r 223:225 svn+ssh://mldev/TRAINING/trunk
A myNewFile
training/test_merge> svn commit -m "Merging trunk r223:225 into
Adding myNewFile
Committed revision 226.

## Next, I edited the file in the branch, and commited it there:
training/test_merge> echo " added in branches/test_merge " >> myNewFile
training/test_merge> svn commit -m "updated in branch" myNewFile
Sending myNewFile
Transmitting file data .
Committed revision 227.

## Finally, I went back to trunk, to merge the branch back into it:
training/trunk> svn merge -r 223:227 \
C myNewFile

## As noted there, I got a conflict, which seems incorrect.
## Here's what it looks like:
training/trunk> ls -l myNewFile*
-rw-rw-r-- 1 dkelkhof group 134 Mar 21 14:26 myNewFile
-rw-rw-r-- 1 dkelkhof group 0 Mar 21 14:26 myNewFile.merge-left.r0
-rw-rw-r-- 1 dkelkhof group 57 Mar 21 14:26 myNewFile.merge-right.r227
-rw-rw-r-- 1 dkelkhof group 26 Mar 21 14:26 myNewFile.working
training/trunk> more myNewFile*
<<<<<<< .working
This is added in trunk
This is added in trunk
added in branches/test_merge
>>>>>>> .merge-right.r227
This is added in trunk
added in branches/test_merge
This is added in trunk


Darin Kelkhoff
Programmer/Web Developer
PH: 800-333-7144
PH: 314-997-4342 Ext 3426
FX: 314-997-7814
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Mar 22 14:49:04 2007

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.