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

Merge limitation, or am I ignernt?

From: Davy Durham <pubaddr_at_davyandbeth.com>
Date: 2004-10-23 23:45:21 CEST

Well, having used svn for a good while now but not needing to do any
branching/merging I finally got around to playing with it today since
I'm sure it's a great feature. I read and re-read Ch 4 on branching and
merging and after that I set up a test repo to start messing around.

However, I discovered something that I would think is a problem in the
real world unless it's just a problem with me.

Here are the steps that demonstrate the issue:

1) I setup the test repo with the usualy trunk, tags and branches directory.
2) I created foo.c and bar.c with some initial text in it so I can start
editing (a long list of number so I can edit in different spots to avoid
contextual conflicts)
3) I branched (copied of course) trunk to branches/feature-test1 (where
in the real world I would be making the branch in order to work on a new
feature but not interfer with mainline development)
4) I commited a change to trunk/foo.c and trunk/bar.c
5) I commited another change to trunk/foo.c and trunk/bar.c
6) I commited a change to branches/feature-test1/foo.c and
branches/feature-test1/bar.c (in different areas to avoid contextual
conflicts)
7) I commited another a change to branches/feature-test1/foo.c and
branches/feature-test1/bar.c

Now suppose I said that I was finished with the feature and ready to
merge all the changes from my branch back to the trunk. I chdir to the
trunk directory and ran "svn merge -r 2:HEAD
file:///test-repo/branches/feature-test1" and everything merges in
fine. "COOL!" I think to myself.. "how nice".

But I didn't commit the changes that the merge made to the trunk
directory, so I reverted them to continue playing around within the
branch. (svn revert *)

Continuting to play in the branch...

8) I renamed branches/feature-test1/foo.c to
branches/feature-test1/fred.c and commited.

Now here's my problem.

My feature implementation contained a rename of a file.

Back in the trunk directory I do a merge from the branch, "svn merge -r
2:HEAD file:///test-repo/feature-test1" and it correctly merges bar.c
again of course. And it deletes foo.c and adds fred.c. "COOL!" I again
think. Then I look in fred.c and it doesn't contain any of the changes
I made in the trunk while it was named foo.c!

This would, I think, be a problem in a real work situation be

Did I miss something? Is there a step that needs to be done first? I
thought that merging from the trunk into the branch first might be
something toward an answer, but I discovered the process that
(obviously) the same problem exists if someone renames a file in the
trunk and I merged the trunk into the branch.

Any help would be appreciated.

Thanks,
   Davy

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sat Oct 23 23:45:52 2004

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