[svk-devel] Re: Hit by merge-ticket corruption again (testcase included)

Brice Figureau brice+svk at daysofwonder.com
Thu Oct 11 10:39:08 EDT 2007


On Thu, 2007-10-11 at 09:12 -0400, Daniel Jacobowitz wrote:
> On Thu, Oct 11, 2007 at 11:12:09AM +0200, Brice Figureau wrote:
> > I want to understand this issue and to debug it, I want to know:
> >  *) where merge-tickets are stored when you 'push' ? I know that the
> > merge-tickets are stored in the 'svk:merge' SVN root property when you
> > 'pull', but for the reverse operation ?
> 
> svk:merge on the other side.

Ok, makes sense...

> >  *) why do we need to put merge-tickets in a global svn property, shared
> > by all the users ? Wouldn't it be better to store those merge-tickets in
> > a file in the depot, since this information is purely local and bound to
> > one depot ?
> 
> No, it isn't local.  You can do the merge in another depot and push it
> back.

Hum, how useful it is ?

> I've hit this bug too.  I couldn't come up with a testcase either.

I think I have a testcase.
It involves using two shell sessions (called session 1 and 2):

# first create the SVN upstream repository
$ svnadmin create repos

##### in SESSION 1 #####

# create depot
$ export SVKROOT=`pwd`/depot1
$ svk mirror --list            
Repository /home/brice/temp/test4/depot1/local does not exist, create?
(y/n)y

# mirror repos
$ svk mirror file://`pwd`/repos //mirror/repos

$ svk cp -p //mirror/repos //local/repos
Waiting for editor...
Committed revision 2.

$ svk co //local/repos wc1
Syncing //local/repos(/local/repos) in /home/brice/temp/test4/wc1 to 2.

# create content
$ cd wc1
$ echo "file 1" > file1.txt

$ svk add file1.txt 
A   file1.txt

$ svk commit -m "file1.txt"
Committed revision 3.

$ svk push -l    
Auto-merging (0, 3) /local/repos to /mirror/repos (base /:0).
Merging back to mirror source file:///home/brice/temp/test4/repos.
A   file1.txt
New merge ticket: 7ef76fb6-aafc-41db-b84c-45c96e11daaa:/local/repos:3
Merge back committed as revision 1.

### SESSION 2 ####

$ export SVKROOT=`pwd`/depot2
$ svk mirror --list
Repository /home/brice/temp/test4/depot2/local does not exist, create?
(y/n)y

$ svk mirror file://`pwd`/repos //mirror/repos
Mirror initialized.  Run svk sync //mirror/repos to start mirroring.

$ svk sync //mirror/repos
Syncing file:///home/brice/temp/test4/repos

$ svk cp -p //mirror/repos //local/repos
Waiting for editor...
Committed revision 2.

$ svk co //local/repos wc2
Syncing //local/repos(/local/repos) in /home/brice/temp/test4/wc2 to 2.

$ cd wc2
$ svk pull
Syncing file:///home/brice/temp/test4/repos
Retrieving log information from 1 to 1
Committed revision 3 from revision 1.
Auto-merging (1, 3) /mirror/repos to /local/repos
(base /mirror/repos:1).
A   file1.txt
New merge ticket: 79e865fa-77c7-4d4f-a35f-2fb95158a337:/:1
New merge ticket: 7ef76fb6-aafc-41db-b84c-45c96e11daaa:/local/repos:3
Committed revision 4.
Syncing //local/repos(/local/repos) in /home/brice/temp/test4/wc2 to 4.
A   file1.txt

$ echo "file2" > file2.txt
svk add file2.txt 
A   file2.txt

$ svk commit -m "file2"
Committed revision 5.

$ svk push -l
Auto-merging (0, 5) /local/repos to /mirror/repos
(base /mirror/repos:3).
Merging back to mirror source file:///home/brice/temp/test4/repos.
A   file2.txt
New merge ticket: fd5f0c96-7712-4483-a41c-52005bba9c90:/local/repos:5
Merge back committed as revision 2.
Syncing file:///home/brice/temp/test4/repos
Retrieving log information from 2 to 2
Committed revision 6 from revision 2.

At this point, all is well. Let's examine the content of the
merge-tickets in the upstrean SVN repository:

$ svn propget 'svk:merge' file:///home/brice/temp/test4/repos 
7ef76fb6-aafc-41db-b84c-45c96e11daaa:/local/repos:3
fd5f0c96-7712-4483-a41c-52005bba9c90:/local/repos:5

Switch back to the Session 1:
##### in SESSION 1 #####

$ echo "file3" >> file1.txt
$ svk commit -m "r2"
Committed revision 5.
$ svk push -l       
Auto-merging (3, 5) /local/repos to /mirror/repos (base /local/repos:3).
Merging back to mirror source file:///home/brice/temp/test4/repos.
U   file1.txt
New merge ticket: 7ef76fb6-aafc-41db-b84c-45c96e11daaa:/local/repos:5
Merge back committed as revision 3.
Syncing file:///home/brice/temp/test4/repos
Retrieving log information from 2 to 3
Committed revision 6 from revision 2.
Committed revision 7 from revision 3.

And now examine the svk:merge property of the upstream SVN repository
one more time:
$ svn propget 'svk:merge' file:///home/brice/temp/test4/repos
7ef76fb6-aafc-41db-b84c-45c96e11daaa:/local/repos:5

And bang, we lost the
'fd5f0c96-7712-4483-a41c-52005bba9c90:/local/repos:5' line... Obviously
we should have "pull"ed before the push...

This was taken with: "This is svk, version v2.0.1 (using Subversion
bindings 1.4.4)".

Should I file a bug-report ?
-- 
Brice Figureau <brice+svk at daysofwonder.com>



More information about the svk-devel mailing list