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

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

From: Madan U S <madan_at_collab.net>
Date: 2006-04-06 08:23:50 CEST

On Thursday 06 Apr 2006 3:28 am, Giovanni Bajo wrote:
> Madan U S <madan@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.

Was talking to David James yesternight and he was telling me the same. I
understand. But I would like to make an obvious point here: The output format
of the svn commandline is more susceptible to change than the working copy
data format itself. :)

> 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.

cool, will check it out.. thx for the pointer.

>
> 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).

sure, let me see if this can be acheived with the same code (or with minor
tweaks). If so, I will give both in the same patch.

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

Thats a great idea... right now, the PATH variable is simply ambiguous.
Taking either dir or url with rules like...
- the dir *should* be a working copy
- the dir *should* be a working copy of the same repository
- the url *should* be of the same working copy etc.,

  which is difficult in two ways...

- exhaustive checks are required to ensure the rules
- difficult for the user to learn.

I would like it if ONLY the repository relative/absolute path were allowed.
Do not permit ad-hoc urls. Permit only paths. But the path entered would be
appended to the current repos path, and not to the cwd.

>
> Many thanks for all your patches!

My pleasure! :)

Regards,
Madan.
Received on Thu Apr 6 08:24:57 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.