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

Re: [PATCH] svn_path_canonicalize

From: Greg Stein <gstein_at_lyra.org>
Date: 2001-09-20 03:02:28 CEST

On Wed, Sep 19, 2001 at 07:52:22PM -0400, Garrett Rooney wrote:
> > in subversion/clients/cmdline/util.c:snv_cl__args_to_target_array
> > we're calling it with svn_path_local_style when at least sometimes
> > (perhaps all the time, i'm not sure) it gets passed an array. right
> > now i've changed it to svn_path_url_style, but i think we may also be
> > passing some paths in, so it may only be working because i've got / as
> > my dirsep char.

It sounds like args_to_target_array should take a path style. Sometimes the
args are URLs, and sometimes they are paths.

Hmm... actually, they can be mixed. Oh, agony. Consider this on Windows:

C:\> svn import http://example.com/repos/test C:\src\test

IMO, args_to_target_array should *not* canonicalize the arguments. That
should be deferred to where we know what style those arguments are. In this
case, the first arg is url_style and the second arg is local_style.

Good find!

>...
> > in subversion/libsvn_ra_dav/fetch.c:we're passing in
> > svn_path_url_style when at least sometimes we're giving it a path.
> > i've changed it to svn_path_local_style and it seems to work fine now.
>
> this change is most likely bogus... it seems to be passing a path

Yes.

> that exists on the server, but it's not a url... a
> printf("url = %s\n") in my_basename will yield this when you try to
> checkout...
>
> url = /repos/svn/$svn/bc/120/.svnignore

It is a *relative* URL. Thus, it is quite a valid URL, and should continue
to be url_style.

Everything in ra_dav is URL-based. There is nothing in there that should
manipulate local paths.

(temp file issues aside, but paths aren't exposed by that, so we're still
okay)

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:42 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.