[Svnmerge] Problem with renamed branches: peg-revs?

Giovanni Bajo rasky at develer.com
Mon Jan 30 05:19:43 PST 2006


Hello,

I have been just reported a problem with svnmerge: it fails when its head
branch (as recorded in the svnmerge-integrated property) is renamed. In
fact, most svn commands basically fail because the complete URL for head
does not exist anymore.

I believe the suggestion is to use peg-revision to record the head branch +
rev at init time. I was wondering if others had similar problems before
and/or agree with the solution. Also peg-revs were introduced in SVN 1.1,
and their introduction is smooth (not all commands support them yet). I'm
not sure how to ensure compatibility with older clients, and I'm looking
forward to suggestions.

The fix is pretty invasive though. For instance, target_to_url is wrong:

def target_to_url(dir):
    """Convert working copy path or repos URL to a repos URL."""
    if is_wc(dir):
        info = get_svninfo(dir)
        return info["URL"]
    return dir

In fact, the URL is valid in the revision of the current working copy, and
might not be available anymore. We should use something along the lines of:

        return info["URL"] + "@" + info["Revision"]

as this would properly identify the URL no matter how many times has been
renamed in the repository. This simple patch makes the testsuite fail
though. I'll investigate this later today.
-- 
Giovanni Bajo




More information about the Svnmerge mailing list