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

Re: [bug] Inconsistent path output from 'svn mkdir --parents'

From: Daniel Rall <dlr_at_collab.net>
Date: 2007-06-08 20:50:23 CEST

On Thu, 31 May 2007, Hyrum K. Wright wrote:

> Daniel Rall wrote:
> > On Fri, 25 May 2007, Daniel L. Rall wrote:
> >
> >> In a complete empty WC (corresponding to an empty repos), try the
> >> following:
> >>
> >> $ svn mkdir --parents branches/foo/bar
> >> A /tmp/wc/branches
> >> A /tmp/wc/branches/foo
> >> A branches/foo/bar
> >>
> >> Note how the first two paths in the ouput are absolute, while the
> >> final path is relative.
> >
> > I'm guessing that this is because we get the absolute path of the
> > parent directories as we walk towards the leaf directory of our WC or
> > repository. Has anyone looked at this one yet?
>
> Dan,
> Your guess is correct. I've looked at it, just haven't had time to do
> anything about it yet.

Mike fixed this in r25333 by making all the paths absolute when in
--parents mode.

It'd be more consistent with other Subversion behavior (e.g. diff) if
we used relative paths if a relative path was provided, but perhaps
that's not possible in this case?

> Do we have any way of recovering a relative pathname from an
> absolute pathname?

Some path arithmatic with svn_path.h would probably do the trick,
perhaps using svn_path_get_longest_ancestor() or svn_path_split().

  • application/pgp-signature attachment: stored
Received on Fri Jun 8 20:50:35 2007

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.