[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: Garrett Rooney <rooneg_at_electricjellyfish.net>
Date: 2001-09-20 01:52:22 CEST

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

to see this in action, just do something like

svn import file:///home/rooneg/rep crap/utilities

inserting a printf("path = %s\n", target->data) inside the for loop in
svn_cl__args_to_target_array will give you...

path = file:///home/rooneg/rep
path = crap/utilities
Segmentation fault (core dumped)

(the segfault isn't my fault, it seems to exist prior to my patch)

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

> i suspect there could be other places there are similar problems, but
> i haven't been able to test everything yet... got sidetracked by
> import problems. also i'm probably masking some more cases of giving
> a path and using svn_path_url_style, because my svn_path_canonicalize
> function now recovers from that case (if strstr (path->data, "//")
> returns null it just assumes you gave it a path). this is making it
> work (at least for checkout and update so far) but it's wrong and will
> fail on windows...
>
> isn't path handling fun!
>
> -garrett
>
> --
> garrett rooney Unix was not designed to stop you from
> rooneg@electricjellyfish.net doing stupid things, because that would
> http://electricjellyfish.net/ stop you from doing clever things.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org

-- 
garrett rooney                     Unix was not designed to stop you from 
rooneg@electricjellyfish.net       doing stupid things, because that would  
http://electricjellyfish.net/      stop you from doing clever things.
---------------------------------------------------------------------
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.