You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Greg Stein <gs...@gmail.com> on 2009/10/31 10:35:40 UTC

Re: svn commit: r40309 - trunk/subversion/svndumpfilter

On Fri, Oct 30, 2009 at 00:48, Branko Cibej <br...@xbc.nu> wrote:
>...
> +++ trunk/subversion/svndumpfilter/main.c       Thu Oct 29 21:48:12 2009        (r40309)
>...
> @@ -1400,7 +1400,7 @@ main(int argc, const char *argv[])
>              style, and absolute. */
>           SVN_INT_ERR(svn_utf_cstring_to_utf8(&prefix, os->argv[i], pool));
>           prefix = svn_dirent_internal_style(prefix, pool);
> -          prefix = svn_path_join("/", prefix, pool);
> +          prefix = svn_dirent_join("/", prefix, pool);
>           APR_ARRAY_PUSH(opt_state.prefixes, const char *) = prefix;

Hmm? This doesn't seem to be a way to make a dirent path "absolute".
And even then, I'd question why/what is the intent here. Are these
prefixes actually directory entries?

Cheers,
-g

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2413206

Re: svn commit: r40309 - trunk/subversion/svndumpfilter

Posted by Branko Cibej <br...@xbc.nu>.
Greg Stein wrote:
> On Fri, Oct 30, 2009 at 00:48, Branko Cibej <br...@xbc.nu> wrote:
>   
>> ...
>> +++ trunk/subversion/svndumpfilter/main.c       Thu Oct 29 21:48:12 2009        (r40309)
>> ...
>> @@ -1400,7 +1400,7 @@ main(int argc, const char *argv[])
>>              style, and absolute. */
>>           SVN_INT_ERR(svn_utf_cstring_to_utf8(&prefix, os->argv[i], pool));
>>           prefix = svn_dirent_internal_style(prefix, pool);
>> -          prefix = svn_path_join("/", prefix, pool);
>> +          prefix = svn_dirent_join("/", prefix, pool);
>>           APR_ARRAY_PUSH(opt_state.prefixes, const char *) = prefix;
>>     
>
> Hmm? This doesn't seem to be a way to make a dirent path "absolute".
>   

It's the closest thing to doing so that we can do. svndumpfilter is
supposed to receive path prefixes to match against; and since internally
all repository paths are "absolute" -- that is, relative to repos root
-- you just have to make sure the prefixes start with a slash.

> And even then, I'd question why/what is the intent here. Are these
> prefixes actually directory entries?
>   

Now thinking this over again, I believe we should be using the svn_uri_
functions in this instance because we're dealing with paths in dump
files, that is to say, repository paths, not directory entries (and the
original svn_dirent_internal_style is then a bit off, too).

-- Brane

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2413217

Re: svn commit: r40309 - trunk/subversion/svndumpfilter

Posted by Branko Cibej <br...@xbc.nu>.
Greg Stein wrote:
> On Fri, Oct 30, 2009 at 00:48, Branko Cibej <br...@xbc.nu> wrote:
>   
>> ...
>> +++ trunk/subversion/svndumpfilter/main.c       Thu Oct 29 21:48:12 2009        (r40309)
>> ...
>> @@ -1400,7 +1400,7 @@ main(int argc, const char *argv[])
>>              style, and absolute. */
>>           SVN_INT_ERR(svn_utf_cstring_to_utf8(&prefix, os->argv[i], pool));
>>           prefix = svn_dirent_internal_style(prefix, pool);
>> -          prefix = svn_path_join("/", prefix, pool);
>> +          prefix = svn_dirent_join("/", prefix, pool);
>>           APR_ARRAY_PUSH(opt_state.prefixes, const char *) = prefix;
>>     
>
> Hmm? This doesn't seem to be a way to make a dirent path "absolute".
> And even then, I'd question why/what is the intent here. Are these
> prefixes actually directory entries?
>   

Fixed in r40325. And thanks for the poke. I was initially just trying to
get rid of the deprecation warnings, now I actually took the time to
read svn_dirent_uri.h. :p

-- Brane

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2413235