You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Ivan Zhakov <iv...@visualsvn.com> on 2011/01/19 22:21:02 UTC
Re: svn commit: r1060937 - in /subversion/branches/uris-as-urls/subversion:
libsvn_fs_base/bdb/changes-table.c libsvn_fs_base/bdb/locks-table.c libsvn_fs_fs/lock.c
On Wed, Jan 19, 2011 at 22:52, <cm...@apache.org> wrote:
> Author: cmpilato
> Date: Wed Jan 19 19:52:24 2011
> New Revision: 1060937
>
> URL: http://svn.apache.org/viewvc?rev=1060937&view=rev
> Log:
> On the 'uris-as-urls' branch, review and correct some use of the
> svn_uri_* APIs. (One step of many similar ones.)
>
> * subversion/libsvn_fs_fs/lock.c
> (set_lock, delete_lock): Review, correct (as needed), and
> rename uses of the svn_uri_* API.
>
> * subversion/libsvn_fs_base/bdb/changes-table.c
> (svn_fs_bdb__changes_fetch): (Same as above.)
>
> * subversion/libsvn_fs_base/bdb/locks-table.c
> (svn_fs_bdb__locks_get): (Same as above.)
>
> Modified:
> subversion/branches/uris-as-urls/subversion/libsvn_fs_base/bdb/changes-table.c
> subversion/branches/uris-as-urls/subversion/libsvn_fs_base/bdb/locks-table.c
> subversion/branches/uris-as-urls/subversion/libsvn_fs_fs/lock.c
>
> Modified: subversion/branches/uris-as-urls/subversion/libsvn_fs_base/bdb/changes-table.c
> URL: http://svn.apache.org/viewvc/subversion/branches/uris-as-urls/subversion/libsvn_fs_base/bdb/changes-table.c?rev=1060937&r1=1060936&r2=1060937&view=diff
> ==============================================================================
> --- subversion/branches/uris-as-urls/subversion/libsvn_fs_base/bdb/changes-table.c (original)
> +++ subversion/branches/uris-as-urls/subversion/libsvn_fs_base/bdb/changes-table.c Wed Jan 19 19:52:24 2011
> @@ -331,7 +331,7 @@ svn_fs_bdb__changes_fetch(apr_hash_t **c
> continue;
>
> /* If we come across a child of our path, remove it. */
> - if (svn_uri_is_child(change->path, hashkey, subpool))
> + if (svn_fspath__is_child(change->path, hashkey, subpool))
> apr_hash_set(changes, hashkey, klen, NULL);
> }
> }
>
> Modified: subversion/branches/uris-as-urls/subversion/libsvn_fs_base/bdb/locks-table.c
> URL: http://svn.apache.org/viewvc/subversion/branches/uris-as-urls/subversion/libsvn_fs_base/bdb/locks-table.c?rev=1060937&r1=1060936&r2=1060937&view=diff
> ==============================================================================
> --- subversion/branches/uris-as-urls/subversion/libsvn_fs_base/bdb/locks-table.c (original)
> +++ subversion/branches/uris-as-urls/subversion/libsvn_fs_base/bdb/locks-table.c Wed Jan 19 19:52:24 2011
> @@ -249,8 +249,9 @@ svn_fs_bdb__locks_get(svn_fs_t *fs,
>
> /* As long as the prefix of the returned KEY matches LOOKUP_PATH we
> know it is either LOOKUP_PATH or a decendant thereof. */
> - if (strcmp(path, "/") != 0)
> + if (svn_fspath__is_root(path, strlen(path)))
^^^^ I think you missed "!" there. It should be "if
(!svn_fspath__is_root(path, strlen(path)))".
> lookup_path = apr_pstrcat(pool, path, "/", (char *)NULL);
--
Ivan Zhakov
VisualSVN Team
Re: svn commit: r1060937 - in /subversion/branches/uris-as-urls/subversion:
libsvn_fs_base/bdb/changes-table.c libsvn_fs_base/bdb/locks-table.c libsvn_fs_fs/lock.c
Posted by "C. Michael Pilato" <cm...@collab.net>.
On 01/19/2011 04:21 PM, Ivan Zhakov wrote:
> On Wed, Jan 19, 2011 at 22:52, <cm...@apache.org> wrote:
[...]
>> Modified: subversion/branches/uris-as-urls/subversion/libsvn_fs_base/bdb/locks-table.c
>> URL: http://svn.apache.org/viewvc/subversion/branches/uris-as-urls/subversion/libsvn_fs_base/bdb/locks-table.c?rev=1060937&r1=1060936&r2=1060937&view=diff
>> ==============================================================================
>> --- subversion/branches/uris-as-urls/subversion/libsvn_fs_base/bdb/locks-table.c (original)
>> +++ subversion/branches/uris-as-urls/subversion/libsvn_fs_base/bdb/locks-table.c Wed Jan 19 19:52:24 2011
>> @@ -249,8 +249,9 @@ svn_fs_bdb__locks_get(svn_fs_t *fs,
>>
>> /* As long as the prefix of the returned KEY matches LOOKUP_PATH we
>> know it is either LOOKUP_PATH or a decendant thereof. */
>> - if (strcmp(path, "/") != 0)
>> + if (svn_fspath__is_root(path, strlen(path)))
>
> ^^^^ I think you missed "!" there. It should be "if
> (!svn_fspath__is_root(path, strlen(path)))".
Fixed in r1061043. (Thanks, again.)
--
C. Michael Pilato <cm...@collab.net>
CollabNet <> www.collab.net <> Distributed Development On Demand
Re: svn commit: r1060937 - in /subversion/branches/uris-as-urls/subversion:
libsvn_fs_base/bdb/changes-table.c libsvn_fs_base/bdb/locks-table.c libsvn_fs_fs/lock.c
Posted by "C. Michael Pilato" <cm...@collab.net>.
On 01/19/2011 04:21 PM, Ivan Zhakov wrote:
> On Wed, Jan 19, 2011 at 22:52, <cm...@apache.org> wrote:
[...]
>> Modified: subversion/branches/uris-as-urls/subversion/libsvn_fs_base/bdb/locks-table.c
>> URL: http://svn.apache.org/viewvc/subversion/branches/uris-as-urls/subversion/libsvn_fs_base/bdb/locks-table.c?rev=1060937&r1=1060936&r2=1060937&view=diff
>> ==============================================================================
>> --- subversion/branches/uris-as-urls/subversion/libsvn_fs_base/bdb/locks-table.c (original)
>> +++ subversion/branches/uris-as-urls/subversion/libsvn_fs_base/bdb/locks-table.c Wed Jan 19 19:52:24 2011
>> @@ -249,8 +249,9 @@ svn_fs_bdb__locks_get(svn_fs_t *fs,
>>
>> /* As long as the prefix of the returned KEY matches LOOKUP_PATH we
>> know it is either LOOKUP_PATH or a decendant thereof. */
>> - if (strcmp(path, "/") != 0)
>> + if (svn_fspath__is_root(path, strlen(path)))
>
> ^^^^ I think you missed "!" there. It should be "if
> (!svn_fspath__is_root(path, strlen(path)))".
Yep! Thanks, Ivan. (And please keep reviewing commits!)
--
C. Michael Pilato <cm...@collab.net>
CollabNet <> www.collab.net <> Distributed Development On Demand