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

svn merge != svn diff | patch

From: Michael J Gruber <michaeljgruber+gmane_at_fastmail.fm>
Date: 2007-08-03 17:47:37 CEST

Hi there,

I seem to misunderstand "svn merge". As per the SVN handbook, svn merge
computes a diff between the 1st two arguments and applies it to the 3rd.
This is not what happens according to my experience.

Say, I have two files f and g, with the following info:

> svn cat g
a
c

> svn cat f
b

> svn cat -r1 f
a

The diff is obvious:

> svn diff -r1:HEAD f
Index: f
===================================================================
--- f (Revision 1)
+++ f (Revision 3)
@@ -1 +1 @@
-a
+b

So is applying the diff to file "g":

> svn diff -r1:HEAD f |patch g
patching file g
> cat g
b
c

Yet, merging with svn is very different:
> svn merge -r1:HEAD f g
C g
> cat g
<<<<<<< .working
a
c
=======
b
>>>>>>> .merge-rechts.r3

That is: svn merge produces conflicts instead of the obvious merge;
moreover, it is unable to suggest the obvious merge as one of the
alternatives. In fact, it really seems to try a 3-way merge between f@1,
f@3 and g (such as kdiff3 does) which is very different from diffing f@1
and f@3 and applying to g.

Am I misreading the documentation?

Michael

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Aug 3 17:53:36 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.