[Svnmerge] [PATCH] svnmerge.py: Make sure the head dir (wc) is fromthe same repository

Giovanni Bajo rasky at develer.com
Wed Apr 5 14:58:32 PDT 2006


Madan U S <madan at collab.net> wrote:

> [[[
> Make sure that the current working copy and the working copy
> dir (if PATH) provided by the head parameter belong to the same
> repository.
>
> * contrib/client-side/svnmerge.py
>   (wc_of_same_repos): New function. Given two working copy dirs,
>   read the entries file, and make sure that both of them belong
>   to the same repository.
>   (main): Add check to make sure that the provided head parameter
>   and the branch dir are working copies and belong to the same
>   repository.
> ]]]

+1 on the concept, but I don't like the entries parsing: it would be the first
time svnmerge depends on the working copy format instead of blindly relying on
the "svn" command line client. You can use svn info to find out the repository
UUID that you can then compare. We already have infrastructure in place to run
"svn info" and provide a handy python dictionary from its result.

If you want to pursue this direction, I'd also check when the head is provided
as a URL ("svn info" on the URL will show the repository UUID as well, so you
can probably use exactly the same codepath).

I'd also love if "svnmerge init" could take a repository-relative path for the
head, but that's for another day :)

Many thanks for all your patches!

Giovanni Bajo




More information about the Svnmerge mailing list