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

<help> Merge Crossed the Streams and placed the contents of file A into file B!!!

From: Peter Kahn <pkahn_at_connected.com>
Date: 2005-01-24 17:34:57 CET

I just encountered what looks like a massive problem with merge. There is either a very nasty bug in merge, or I must have done something wrong. I'm inclined to go with the later...

Basically, a merge placed the contents of a cpp file into a java file. When I look at the source and destination before and after the merge, I find the following:

Src: beginning of merge rev range - java file
         end of merge rev range - java file with a change

Dest: premerge - java file
        Postmerge - cpp file text in the java file

When I look at the logs for this, everything looks ok, but clearly it is not. Any ideas what I can do to debug this problem? I am going to replicate it on win32 and linux to see if I can and if I get an OS specific varience.

Environment ---------------------------------------------------------------------------------

SvnServer:

 linux 2.4.20-8, svn 112, httpd 2.0.52, Berkeley 4.2.52.NC, passes all tests in make check

SvnClient:

 linux 2.6.5-1.358, svn 112, httpd 2.0.52, BerkeleyDB 4.2.52.NC, passes all tests in make check

Situation --------------------------------------------------------------------------------------
  We have a mainline and a series of userbranches. A branch controller python script merges changes from the mainline to each UserBranch and sending an email and aborting upon conflicts. If you think this is a cool idea, please don't try implementing it because its really not worth the trouble. This system will be discontinued soon as the cost/benefits make it a bit of a loser.

The script just issues svn commands at the command line, so its pretty simple.
 - determine head revision as a number (svn log -rHEAD svn://repository-root)
 - update a local workpace to HEAD
 - read last-sync-revision from xml doc
 - merge -r<last-sync-revision>:<head> mainline local-workspace >> logfile 2>&1
 - check status
 - if no conflicts, commit.

 

Specifics -------------------------------------------------------------------------------------------------
svn update /home/buildctl/BC1/BWS1/jwestDuff -r HEAD > /home/buildctl/BC1/BWS1/SCM_up.txt

svn info command
URL = svn://svn/repos/UserBranches/jwest/Duff/Main
Last Changed Date = 2005-01-21 09:09:36 -0500 (Fri, 21 Jan 2005)
Node Kind = directory
Last Changed Author = jwest
Properties Last Updated = 2005-01-21 12:24:57 -0500 (Fri, 21 Jan 2005)
Repository UUID = 42d8f71c-0bc2-0310-97e0-bf0934f2b69a
Path = /home/buildctl/BC1/BWS1/jwestDuff
Last Changed Rev = 16534
Revision = 16573

svn merge -r 16500:16572 svn://svn/repos/Duff/Main "/home/buildctl/BC1/BWS1/jwestDuff" >> /home/buildctl/BC1/BWS1/SCM_get.txt 2>&1

svn ci -m "UserBranchSystem - 16500:16572" /home/buildctl/BC1/BWS1/jwestDuff > /home/buildctl/BC1/BWS1/SCM_ci.txt
Committed revision 16574.

The result is that the Java file in the UserBranch at 16573 is a java file, but at 16574 it contains the contents of a cpp file that was also modified in the merge.

-- 
Peter Kahn 
pkahn@connected.com 
Received on Mon Jan 24 17:35:46 2005

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.