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

Re: Evil twin bug ?

From: Ryan Schmidt <subversion-2006c_at_ryandesign.com>
Date: 2006-08-24 09:17:29 CEST

On Aug 24, 2006, at 06:55, Lakshman Srilakshmanan wrote:

> I appear to have a problem with merging Evil twins in Subversion. I
> have
> outlined the scenario below.
>
> Could you please review it and inform me whether this is a bug or not,
> if it is bug then whether it has been raised as a bug ?
>
> Overview
> --------
> /branches
> /ProjectA
> /ProjectB
> /tags
> /trunk
>
> Scenario
> --------
> Step 1 -- Add files into Project A
>
> Step 2 -- Add files into Project B
>
> Step 3 -- Merge Project A into trunk and commit
>
> Validate files
>
> Step 4 -- Merge Project B into trunk
>
> Validate files (Note how the Revision numbers are zero)
>
> Step 5 -- Commit files into trunk (Out of date) error
>
>
> Step 1 -- Add files into Project A
> ------------------------------------------------
> scmop@maggie:~/ProjectA > svn add *
> A (bin) logo_tp.gif
> A NantExample.build
> scmop@maggie:~/ProjectA > svn commit *
> Adding NantExample.build
> Adding (bin) logo_tp.gif
> Transmitting file data ..
> Committed revision 6.
>
>
> Step 2 -- Add files into Project B
> ------------------------------------------------
> scmop@maggie:~/ProjectB > svn add *
> A (bin) logo_tp.gif
> A NantExample.build
> scmop@maggie:~/ProjectB > svn commit
> Adding NantExample.build
> Adding (bin) logo_tp.gif
> Transmitting file data ..
> Committed revision 7.
>
>
> Step 3 -- Merge Project A into trunk
> ------------------------------------
> scmop_at_maggie:~/sgs-trunk > svn merge svn://lakshman@maggie/sgs/trunk
> svn://lakshman@maggie/sgs/branches/ProjectA
> A logo_tp.gif
> A NantExample.build
> scmop@maggie:~/sgs-trunk > svn commit
> Adding NantExample.build
> Adding (bin) logo_tp.gif

That's not how you merge Project A into trunk. You've asked
Subversion to construct a list of steps that turn the trunk into
Project A, and to perform those steps on the working copy of trunk.
If trunk and Project A are identical except for the changes you've
made in Project A, then this will seem to work fine, but if there are
any other changes in trunk that were not made in Project A, those
changes will be *undone* by the above merge, which is probably not
what you wanted. Instead, you should ask Subversion to construct a
list of steps that transform Project A at its inception into Project
A as it exists now, and perform those in the trunk working copy.

scmop_at_maggie:~/sgs-trunk > svn merge -rA1:A2 svn://lakshman@maggie/
sgs/branches/ProjectA

where A1 is the revision at which the branch was created, and A2 is
the current revision. Since Subversion offers no merge tracking yet,
you must manually keep track of A1 and A2, and ensure that you don't
try to merge the same revisions more than once.

> Validate files
> --------------
> scmop@maggie:~/sgs-trunk > svn info NantExample.build
> Path: NantExample.build
> Name: NantExample.build
> URL: svn://lakshman@maggie/sgs/trunk/NantExample.build
> Repository Root: svn://lakshman@maggie/sgs
> Repository UUID: 298f41a3-bb1b-0410-bb7a-81c08510be87
> Revision: 8
> Node Kind: file
> Schedule: normal
> Last Changed Author: lakshman
> Last Changed Rev: 8
> Last Changed Date: 2006-08-24 14:29:14 +1000 (Thu, 24 Aug 2006)
> Text Last Updated: 2006-08-24 14:28:58 +1000 (Thu, 24 Aug 2006)
> Properties Last Updated: 2006-08-24 14:28:58 +1000 (Thu, 24 Aug 2006)
> Checksum: 7bcd34d20526838ccc4eb46921093972
>
> scmop@maggie:~/sgs-trunk > svn info logo_tp.gif
> Path: logo_tp.gif
> Name: logo_tp.gif
> URL: svn://lakshman@maggie/sgs/trunk/logo_tp.gif
> Repository Root: svn://lakshman@maggie/sgs
> Repository UUID: 298f41a3-bb1b-0410-bb7a-81c08510be87
> Revision: 8
> Node Kind: file
> Schedule: normal
> Last Changed Author: lakshman
> Last Changed Rev: 8
> Last Changed Date: 2006-08-24 14:29:14 +1000 (Thu, 24 Aug 2006)
> Text Last Updated: 2006-08-24 14:28:58 +1000 (Thu, 24 Aug 2006)
> Properties Last Updated: 2006-08-24 14:28:58 +1000 (Thu, 24 Aug 2006)
> Checksum: efd57e540094bb6d9c211eed5f1e7e31
>
>
> Step 4 -- Merge Project B into trunk
> ------------------------------------
> scmop_at_maggie:~/sgs-trunk > svn merge svn://lakshman@maggie/sgs/trunk
> svn://lakshman@maggie/sgs/branches/ProjectB
> D logo_tp.gif
> A logo_tp.gif
> D NantExample.build
> A NantExample.build

Same here. You've asked to transform trunk (with is now the same as
Project A) into Project B, so you see it's deleting the files that
had been added from Project A, and replacing them with those from
Project B. Again, you need to merge just the revisions from Project B
that you want:

scmop_at_maggie:~/sgs-trunk > svn merge -rB1:B2 svn://lakshman@maggie/
sgs/branches/ProjectB

> Validate files
> --------------
> scmop@maggie:~/sgs-trunk > svn info NantExample.build
> Path: NantExample.build
> Name: NantExample.build
> URL: svn://lakshman@maggie/sgs/trunk/NantExample.build
> Repository Root: svn://lakshman@maggie/sgs
> Revision: 0
> Node Kind: file
> Schedule: replace

> Copied From URL:
> svn://lakshman@maggie/sgs/branches/ProjectB/NantExample.build
> Copied From Rev: 8
> Last Changed Author: lakshman
> Last Changed Rev: 7
> Last Changed Date: 2006-08-24 14:27:18 +1000 (Thu, 24 Aug 2006)
> Text Last Updated: 2006-08-24 14:31:37 +1000 (Thu, 24 Aug 2006)
> Properties Last Updated: 2006-08-24 14:31:37 +1000 (Thu, 24 Aug 2006)
> Checksum: 7bcd34d20526838ccc4eb46921093972
>
> scmop@maggie:~/sgs-trunk > svn info logo_tp.gif
> Path: logo_tp.gif
> Name: logo_tp.gif
> URL: svn://lakshman@maggie/sgs/trunk/logo_tp.gif
> Repository Root: svn://lakshman@maggie/sgs
> Revision: 0
> Node Kind: file
> Schedule: replace
> Copied From URL: svn://lakshman@maggie/sgs/branches/ProjectB/
> logo_tp.gif
> Copied From Rev: 8
> Last Changed Author: lakshman
> Last Changed Rev: 7
> Last Changed Date: 2006-08-24 14:27:18 +1000 (Thu, 24 Aug 2006)
> Text Last Updated: 2006-08-24 14:31:37 +1000 (Thu, 24 Aug 2006)
> Properties Last Updated: 2006-08-24 14:31:37 +1000 (Thu, 24 Aug 2006)
> Checksum: efd57e540094bb6d9c211eed5f1e7e31
>
> Step 5 -- Commit files into trunk
> ---------------------------------
> scmop@maggie:~/sgs-trunk > svn commit
> Replacing NantExample.build
> Replacing logo_tp.gif
> svn: Commit failed (details follow):
> svn: Out of date: '/trunk/NantExample.build' in transaction '8-1'
> svn: Your commit message was left in a temporary file:
> svn: '/home/scmop/sgs-trunk/svn-commit.tmp'

In the end, I'm not in fact sure why there's an out-of-date error
here. But the commands you're issuing do not correspond to the
actions you want to perform, so I'd fix that first, then see where
that leaves you.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Aug 24 09:18:46 2006

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.