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

Re: svn commit: r935413 - /subversion/trunk/subversion/libsvn_wc/adm_crawler.c

From: Greg Stein <gstein_at_gmail.com>
Date: Sun, 25 Apr 2010 01:54:14 -0400

On Sun, Apr 18, 2010 at 17:53, Bert Huijben <bert_at_qqmail.nl> wrote:
>
>
>> -----Original Message-----
>> From: gstein_at_apache.org [mailto:gstein_at_apache.org]
>> Sent: zondag 18 april 2010 23:17
>> To: commits_at_subversion.apache.org
>> Subject: svn commit: r935413 -
>> /subversion/trunk/subversion/libsvn_wc/adm_crawler.c
>>
>> Author: gstein
>> Date: Sun Apr 18 21:16:55 2010
>> New Revision: 935413
>>
>> URL: http://svn.apache.org/viewvc?rev=935413&view=rev
>> Log:
>> Fix potential URI encoding/decoding bug.
>>
>> * subversion/libsvn_wc/adm_crawler.c:
>>   (report_revisions_and_depths): wrap a couple comments. when the child
>> is
>>     stripped off the URI, then decode it before comparison.
>>
>> Modified:
>>     subversion/trunk/subversion/libsvn_wc/adm_crawler.c
>>
>> Modified: subversion/trunk/subversion/libsvn_wc/adm_crawler.c
>> URL:
>> http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/adm_
>> crawler.c?rev=935413&r1=935412&r2=935413&view=diff
>> =======================================================================
>> =======
>> --- subversion/trunk/subversion/libsvn_wc/adm_crawler.c (original)
>> +++ subversion/trunk/subversion/libsvn_wc/adm_crawler.c Sun Apr 18
>> 21:16:55 2010
>> @@ -360,8 +360,8 @@ report_revisions_and_depths(svn_wc__db_t
>>              }
>>            else
>>              {
>> -              /* We want to pull in the excluded target. So, report it
>> as deleted,
>> -                 and server will respond properly. */
>> +              /* We want to pull in the excluded target. So, report it
>> as
>> +                 deleted, and server will respond properly. */
>>                if (! report_everything)
>>                  SVN_ERR(reporter->delete_path(report_baton,
>>                                                this_path, iterpool));
>> @@ -424,10 +424,10 @@ report_revisions_and_depths(svn_wc__db_t
>>            else
>>              missing = TRUE;
>>
>> -          /* If a node is still missing from disk here, we have no way
>> to recreate
>> -             it locally, so report as missing and move along.  Again,
>> don't bother
>> -             if we're reporting everything, because the dir is already
>> missing on
>> -             the server. */
>> +          /* If a node is still missing from disk here, we have no way
>> to
>> +             recreate it locally, so report as missing and move along.
>> +             Again, don't bother if we're reporting everything,
>> because the
>> +             dir is already missing on the server. */
>>            if (missing && wrk_kind == svn_wc__db_kind_dir
>>                 && (depth > svn_depth_files || depth ==
>> svn_depth_unknown))
>>              {
>> @@ -450,7 +450,8 @@ report_revisions_and_depths(svn_wc__db_t
>>            const char *childname = svn_uri_is_child(dir_repos_relpath,
>>                                                     this_repos_relpath,
>> NULL);
>
> s/svn_uri/svn_relpath/
>>
>> -          if (!childname || strcmp(childname, child) != 0)
>> +          if (childname == NULL
>> +              || strcmp(svn_path_uri_decode(childname, iterpool),
>> child) != 0)
>
> A repos relpath is already uri_decoded, so this would break paths that have a literal %20 somewhere. (It would be correct if it was a real uri instead of a relpath)

Thanks. I didn't notice that the svn_uri_is_child function was taking
relpaths. Just that its result was not being decoded...

Fixed in r937748

Cheers,
-g
Received on 2010-04-25 07:54:49 CEST

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.