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

Re: svn commit: r29239 - trunk/subversion/libsvn_client

From: Paul Burba <ptburba_at_gmail.com>
Date: Mon, 11 Feb 2008 15:34:03 -0500

On Feb 11, 2008 2:06 PM, C. Michael Pilato <cmpilato_at_collab.net> wrote:
> Paul Burba wrote:
> >>> @@ -3814,7 +3814,8 @@
> >>> {
> >>> svn_location_segment_t *new_segment =
> >>> apr_pcalloc(pool, sizeof(*new_segment));
> >>> - new_segment->path = copyfrom_path;
> >>> + /* Skip the leading '/'. */
> >>> + new_segment->path = copyfrom_path + 1;
> >>> new_segment->range_start = copyfrom_rev;
> >>> new_segment->range_end = copyfrom_rev;
> >>> segment->range_start = copyfrom_rev + 1;
> >> It's not possible for copyfrom_path to be "", right?
> >
> > Are you thinking we could end up with "" rather than "/"? If so, I
> > don't see how that is possible, maybe I'm missing something, but how
> > can you copy the root of a repository (which is obviously required for
> > it to be a copy source)?
>
> The root can certainly be the source of a copy. Our client libraries
> disallow copying a path into a child of itself, but IIRC the filesystem
> libraries allow as much.
>
> > Regardless, we should probably should check for the leading '/'.
>
> Yep. We need something like:
>
> (*copyfrom_path == '/') ? copyfrom_path + 1 : copyfrom_path;

Done r29270.

> or:
>
> copyfrom_path + ((*copyfrom_path == '/') ? 1 : 0);
>
>
> --
> C. Michael Pilato <cmpilato_at_collab.net>
> CollabNet <> www.collab.net <> Distributed Development On Demand
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-02-11 21:34:14 CET

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