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

Merge information lost with newer versions of subversion

From: Henrik Carlqvist <hc528_at_poolhem.se>
Date: Wed, 26 Feb 2014 20:41:38 +0100

Since a few years (I think it was with release 1.6.17 of subversion) the
merge information shown from "svn log -g" has been changed. The new way to
show merge logs means some improvements like less redundant information
and better performance. Unfortunately, when using these newer versions of
svn to gather information about merges I have found that some merge
information is lost. For that reason I have stuck to version 1.6.16 for
these purposes.

Now I have finally been able to create a small case where merge
information is lost. In the example below I type the created revision in
the left margin to make the commands and revisions easier to discuss:

-8<-----------------------------------------
   svnadmin create /tmp/repo_test
   mkdir svn_work
 1 svn import -m "" svn_work file:///tmp/repo_test/trunk
 2 svn import -m "" svn_work file:///tmp/repo_test/branches
   rmdir svn_work
   svn checkout file:///tmp/repo_test/trunk svn_work
   echo hello > svn_work/hello.txt
   svn add svn_work/hello.txt
 3 svn commit -m "" svn_work/
 4 svn copy -m "" file:///tmp/repo_test/trunk
file:///tmp/repo_test/branches/1
   echo hello world > svn_work/hello.txt
 5 svn commit -m "" svn_work/
 6 svn copy -m "" file:///tmp/repo_test/trunk
file:///tmp/repo_test/branches/2
   svn switch file:///tmp/repo_test/branches/2 svn_work
   echo hello > svn_work/hello2.txt
   svn add svn_work/hello2.txt
 7 svn commit -m "" svn_work/
   svn switch file:///tmp/repo_test/branches/1 svn_work
   svn merge file:///tmp/repo_test/trunk svn_work
 8 svn commit -m "" svn_work/
   echo hello > svn_work/hello3.txt
   svn add svn_work/hello3.txt
 9 svn commit -m "" svn_work/
   svn switch file:///tmp/repo_test/trunk svn_work/
   svn merge --reintegrate file:///tmp/repo_test/branches/1 svn_work
10 svn commit -m "" svn_work/
   svn switch file:///tmp/repo_test/branches/2 svn_work
   svn merge file:///tmp/repo_test/trunk svn_work
11 svn commit -m "" svn_work/
   svn switch file:///tmp/repo_test/trunk svn_work/
   svn merge --reintegrate file:///tmp/repo_test/branches/2 svn_work
12 svn commit -m "" svn_work/
svn log -q -g file:///tmp/repo_test/trunk
-8<-----------------------------------------

Svn version 1.6.16 might give a little redundant information and is
slower, but it gives one important log entry:

...
------------------------------------------------------------------------
r9 | henca | 2014-02-25 11:21:05 +0100 (Tue, 25 Feb 2014)
Merged via: r10
------------------------------------------------------------------------
...

The above log entry from svn 1.6.16 shows that branches/1 with latest
revision 9 was merged back into trunk on revision 10.

When using any newer version, up to and including the current 1.8.8 the
information about the merge of branches/1 into trunk on revision 10 is
lost:

------------------------------------------------------------------------
r12 | henca | 2014-02-25 13:06:18 +0100 (Tue, 25 Feb 2014)
------------------------------------------------------------------------
r11 | henca | 2014-02-25 13:06:17 +0100 (Tue, 25 Feb 2014)
Merged via: r12
------------------------------------------------------------------------
r9 | henca | 2014-02-25 13:06:15 +0100 (Tue, 25 Feb 2014)
Merged via: r12, r11
------------------------------------------------------------------------
r8 | henca | 2014-02-25 13:06:14 +0100 (Tue, 25 Feb 2014)
Merged via: r12, r11
------------------------------------------------------------------------
r4 | henca | 2014-02-25 13:06:12 +0100 (Tue, 25 Feb 2014)
Merged via: r12, r11
------------------------------------------------------------------------
r7 | henca | 2014-02-25 13:06:13 +0100 (Tue, 25 Feb 2014)
------------------------------------------------------------------------
r6 | henca | 2014-02-25 13:06:13 +0100 (Tue, 25 Feb 2014)
------------------------------------------------------------------------
r10 | henca | 2014-02-25 13:06:16 +0100 (Tue, 25 Feb 2014)
------------------------------------------------------------------------
r5 | henca | 2014-02-25 13:06:12 +0100 (Tue, 25 Feb 2014)
------------------------------------------------------------------------
r3 | henca | 2014-02-25 13:06:12 +0100 (Tue, 25 Feb 2014)
------------------------------------------------------------------------
r1 | henca | 2014-02-25 13:06:11 +0100 (Tue, 25 Feb 2014)
------------------------------------------------------------------------

This log is only affected by the version of svn used for the command "svn
log", an older version of svn will still show the correct log of a
repository created by a newer version of svn.

If anyone want to play with my example I also have the commands without
any revision number in the left margin:

-8<-----------------------------------------
svnadmin create /tmp/repo_test
mkdir svn_work
svn import -m "" svn_work file:///tmp/repo_test/trunk
svn import -m "" svn_work file:///tmp/repo_test/branches
rmdir svn_work
svn checkout file:///tmp/repo_test/trunk svn_work
echo hello > svn_work/hello.txt
svn add svn_work/hello.txt
svn commit -m "" svn_work/
svn copy -m "" file:///tmp/repo_test/trunk
file:///tmp/repo_test/branches/1
echo hello world > svn_work/hello.txt
svn commit -m "" svn_work/
svn copy -m "" file:///tmp/repo_test/trunk
file:///tmp/repo_test/branches/2
svn switch file:///tmp/repo_test/branches/2 svn_work
echo hello > svn_work/hello2.txt
svn add svn_work/hello2.txt
svn commit -m "" svn_work/
svn switch file:///tmp/repo_test/branches/1 svn_work
svn merge file:///tmp/repo_test/trunk svn_work
svn commit -m "" svn_work/
echo hello > svn_work/hello3.txt
svn add svn_work/hello3.txt
svn commit -m "" svn_work/
svn switch file:///tmp/repo_test/trunk svn_work/
svn merge --reintegrate file:///tmp/repo_test/branches/1 svn_work
svn commit -m "" svn_work/
svn switch file:///tmp/repo_test/branches/2 svn_work
svn merge file:///tmp/repo_test/trunk svn_work
svn commit -m "" svn_work/
svn switch file:///tmp/repo_test/trunk svn_work/
svn merge --reintegrate file:///tmp/repo_test/branches/2 svn_work
svn commit -m "" svn_work/
-8<-----------------------------------------

regards Henrik
Received on 2014-02-26 20:42:14 CET

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.