git-svn: SVK merge commits can have >2 parents

5 messages, 3 authors, 2016-06-15 · open the first message on its own page

git-svn: SVK merge commits can have >2 parents

From: Alex Vandiver <hidden>
Date: 2016-06-15 22:47:47

  Heya,

While converting a mildly complicated svn repository that was managed
with SVK, I ran across the following oddness.  `svk smerge` can only
merge between _two_ branches at once -- however, the way that svk
merge detection works, you can end up with erroneous extra parents
from long-dead branches.  Case in point:

    export SVKROOT=/tmp/svk-testing-$$
    svk mkdir //trunk -m 'trunk'
    svk mkdir //branches -m 'branches'
    svk co //trunk
    svk cp //trunk/ //branches/feature1 -m 'branch for feature1'
    svk cp //trunk/ //branches/feature2 -m 'branch for feature2'
    svk co //branches/feature1
    cd feature1
    echo "foo" >foo
    svk add foo
    svk ci -m 'feature1 development'
    svk sm //branches/feature1 //trunk -m 'merge feature1 to trunk'
    cd ..
    svk co //branches/feature2
    cd feature2
    echo "bar" >bar
    svk add bar
    svk ci -m 'feature2 development'
    svk sm //trunk //branches/feature2 -m 'merge from trunk'
    cd ..

    git svn clone -s file://$SVKROOT/local

The 'feature2' branch will appear to have three parents: r7, r6, _and_
r5.  The r5 parent is extraneous, and only appears because r5 was
previously merged into trunk, as part of r6.

Given this, I'm a little confused why find_extra_svk_parents is
written the way that it is, in seemingly allowing multiple extra
parents to be found.  Since the most recent (i.e., highest-numbered)
change is by definition the only one that can account for all of the
other svk:merge changes, I _believe_ the attached diff to be correct,
but I'm unsure because of the implicit current assumption that smerges
can produce multiple parents.

 - Alex
-- 
Networking -- only one letter away from not working

Re: git-svn: SVK merge commits can have >2 parents

From: Alex Vandiver <hidden>
Date: 2016-06-15 22:47:47

At Sun Nov 29 02:28:39 -0500 2009, Alex Vandiver wrote:
While converting a mildly complicated svn repository that was managed
with SVK, I ran across the following oddness.  `svk smerge` can only
merge between _two_ branches at once -- however, the way that svk
merge detection works, you can end up with erroneous extra parents
from long-dead branches.
Upon a little more inspection, I now understand that the rev-parse
lines in find_extra_svk_parents are attempting to deal with this exact
circumstance -- but they fail to properly sort the merge tickets
first, which leads to this incorrect behavior.  Armed with this
understanding, I'm more confident in the attached updated patch.  I
assume, however, that the logic allows for more than one extra parent
only because such an occurrance could be constructed by hand-editing
svk:merge, because AFAIK svk's command-line tools should be able to
construct such a circumstance.
 - Alex
-- 
Networking -- only one letter away from not working

Re: git-svn: SVK merge commits can have >2 parents

From: Eric Wong <hidden>
Date: 2016-06-15 22:47:47

Alex Vandiver [off-list ref] wrote:
At Sun Nov 29 02:28:39 -0500 2009, Alex Vandiver wrote:
quoted
While converting a mildly complicated svn repository that was managed
with SVK, I ran across the following oddness.  `svk smerge` can only
merge between _two_ branches at once -- however, the way that svk
merge detection works, you can end up with erroneous extra parents
from long-dead branches.
Upon a little more inspection, I now understand that the rev-parse
lines in find_extra_svk_parents are attempting to deal with this exact
circumstance -- but they fail to properly sort the merge tickets
first, which leads to this incorrect behavior.  Armed with this
understanding, I'm more confident in the attached updated patch.  I
Hi Alex, Sam,

I'll defer to Sam for the Ack, my svk knowledge is limited. Thanks.

-- 
Eric Wong

Re: [spf:guess] Re: git-svn: SVK merge commits can have >2 parents

From: Sam Vilain <hidden>
Date: 2016-06-15 22:47:47

On Sun, 2009-11-29 at 08:08 +0000, Eric Wong wrote:
Alex Vandiver [off-list ref] wrote:
quoted
At Sun Nov 29 02:28:39 -0500 2009, Alex Vandiver wrote:
quoted
While converting a mildly complicated svn repository that was managed
with SVK, I ran across the following oddness.  `svk smerge` can only
merge between _two_ branches at once -- however, the way that svk
merge detection works, you can end up with erroneous extra parents
from long-dead branches.
Upon a little more inspection, I now understand that the rev-parse
lines in find_extra_svk_parents are attempting to deal with this exact
circumstance -- but they fail to properly sort the merge tickets
first, which leads to this incorrect behavior.  Armed with this
understanding, I'm more confident in the attached updated patch.  I
Hi Alex, Sam,

I'll defer to Sam for the Ack, my svk knowledge is limited. Thanks.
Yes, the change does make sense to me - nicely done, Alex.

Acked-By: Sam Vilain <redacted>

Sam

Re: [spf:guess] Re: git-svn: SVK merge commits can have >2 parents

From: Eric Wong <hidden>
Date: 2016-06-15 22:47:47

Sam Vilain [off-list ref] wrote:
On Sun, 2009-11-29 at 08:08 +0000, Eric Wong wrote:
quoted
Alex Vandiver [off-list ref] wrote:
quoted
At Sun Nov 29 02:28:39 -0500 2009, Alex Vandiver wrote:
quoted
While converting a mildly complicated svn repository that was managed
with SVK, I ran across the following oddness.  `svk smerge` can only
merge between _two_ branches at once -- however, the way that svk
merge detection works, you can end up with erroneous extra parents
from long-dead branches.
Upon a little more inspection, I now understand that the rev-parse
lines in find_extra_svk_parents are attempting to deal with this exact
circumstance -- but they fail to properly sort the merge tickets
first, which leads to this incorrect behavior.  Armed with this
understanding, I'm more confident in the attached updated patch.  I
Hi Alex, Sam,

I'll defer to Sam for the Ack, my svk knowledge is limited. Thanks.
Yes, the change does make sense to me - nicely done, Alex.

Acked-By: Sam Vilain <redacted>
Thanks Sam, acked and pushed to git://git.bogomips.org/git-svn

-- 
Eric Wong
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help