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

Re: SEGFAULT in 'svn pget' (no time to diagnose)

From: Blair Zajac <blair_at_orcaware.com>
Date: 2007-11-05 17:57:21 CET

C. Michael Pilato wrote:
> Blair Zajac wrote:
>> Is it safe to do that, given that paths are run through these steps?
>> Are there any UTF-8 issues I need to be aware of, in the following
>> Python pseudo code?
>>
>> (peg_rev, path) = svn_opt_parse_path(path)
>> path = svn_path_cstring_from_utf8(path)
>> path = apr_filepath_merge(path)
>> path = svn_path_cstring_to_utf8(path)
>> path = svn_path_canonicalize(path)
>> path = "%s@%s" % (path, peg_rev)
>
> Well, that last step would of course not re-add a peg-rev if there wasn't
> one to begin with, but other than that, I don't know of any issues with this
> path handling plan. Where in all this does conversion to internal style
> occur? Inside svn_opt_parse_path()?

svn_opt_parse_path() doesn't call svn_path_internal_style() and neither does
svn_opt_args_to_target_array2().

By the way, the above psuedo-code for svn_opt_args_to_target_array2()
implementation is missing an initial svn_utf_cstring_to_utf8() call, so here's
my current plan:

path = svn_utf_cstring_to_utf8(path)
(peg_rev, path) = svn_opt_parse_path(path) # <-- new for my changes
path = svn_path_cstring_from_utf8(path)
path = apr_filepath_merge(path)
path = svn_path_cstring_to_utf8(path)
path = svn_path_canonicalize(path)
path = if peg_rev: "%s@%s" % (path, peg_rev) # <-- new for my changes

How's that look?

Blair

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Nov 5 17:57:36 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.