You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Kannan <ka...@collab.net> on 2009/10/23 09:04:06 UTC

[PATCH] Fix some deprecation warnings

Log:
Resolve some deprecation warnings and a bit of formatting.

* subversion/libsvn_subr/target.c
 (svn_path_condense_targets): Use `svn_dirent_get_absolute()',
 `svn_dirent_get_longest_ancestor()' and `svn_dirent_is_root()'.
 (svn_path_remove_redundancies): Use `svn_dirent_get_absolute()' and
 `svn_dirent_is_child()'.

Patch by: Kannan R <ka...@collab.net>

-- 
Regards,
Kannan

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

Re: [PATCH] Fix some deprecation warnings

Posted by Senthil Kumaran S <se...@collab.net>.
Julian Foad wrote:
> On Fri, 2009-10-23 at 14:34 +0530, Kannan wrote:
>> Log:
>> Resolve some deprecation warnings and a bit of formatting.
>>
>> * subversion/libsvn_subr/target.c
>>  (svn_path_condense_targets): Use `svn_dirent_get_absolute()',
>>  `svn_dirent_get_longest_ancestor()' and `svn_dirent_is_root()'.
> 
> The doc string of svn_path_condense_targets() indicates it can operate
> on dirents or URLs. I don't think you can simply change the
> implementation like this without checking which kind of targets they
> are.

Also I think there is no point in changing the logic of an already deprecated
public API (svn_path_condense_targets) and handle the overhead of revving the
API for this/similar may be new change in logic.

>>  (svn_path_remove_redundancies): Use `svn_dirent_get_absolute()' and
>>  `svn_dirent_is_child()'.
> 
> Does the same apply here? I haven't checked.

Looking at the consumer (only one) of this API 'svn_client_commit4' it looks
like an URL will not be passed to 'svn_path_remove_redundancies', but the above
change does change the logic of the public API which may require a API revving
(I don't know in which version 'svn_path_remove_redundancies' API was
introduced, not obvious from the doc string).

Thank You.

-- 
Senthil Kumaran S
http://www.stylesen.org/

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

Re: [PATCH] Fix some deprecation warnings

Posted by Julian Foad <ju...@btopenworld.com>.
On Fri, 2009-10-23 at 14:34 +0530, Kannan wrote:
> Log:
> Resolve some deprecation warnings and a bit of formatting.
> 
> * subversion/libsvn_subr/target.c
>  (svn_path_condense_targets): Use `svn_dirent_get_absolute()',
>  `svn_dirent_get_longest_ancestor()' and `svn_dirent_is_root()'.

The doc string of svn_path_condense_targets() indicates it can operate
on dirents or URLs. I don't think you can simply change the
implementation like this without checking which kind of targets they
are.

>  (svn_path_remove_redundancies): Use `svn_dirent_get_absolute()' and
>  `svn_dirent_is_child()'.

Does the same apply here? I haven't checked.

- Julian

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

Re: [PATCH] Fix some deprecation warnings

Posted by Kannan <ka...@collab.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Branko Čibej wrote:
> Kannan wrote:
>> Log:
>> Resolve some deprecation warnings and a bit of formatting.
>>
>> * subversion/libsvn_subr/target.c
>>  (svn_path_condense_targets): Use `svn_dirent_get_absolute()',
>>  `svn_dirent_get_longest_ancestor()' and `svn_dirent_is_root()'.
>>  (svn_path_remove_redundancies): Use `svn_dirent_get_absolute()' and
>>  `svn_dirent_is_child()'.
>>
>> Patch by: Kannan R <ka...@collab.net>
>>   
>> @@ -121,8 +121,8 @@
>> abs_targets_i = APR_ARRAY_IDX(abs_targets, i, const char *);
>> abs_targets_j = APR_ARRAY_IDX(abs_targets, j, const char *);
>> - ancestor = svn_path_get_longest_ancestor
>> - (abs_targets_i, abs_targets_j, pool);
>> + ancestor = svn_dirent_get_longest_ancestor
>> + (abs_targets_i, abs_targets_j, pool);
>> if (*ancestor == '\0')
>> continue;
> 
> I'm curious -- why this change? The original indentation looks correct,
> although I would have expected the opening parenthesis to be at the end
> of the previous line.
> 
> -- Brane

Oops, that wasn't my intention. Might've been due to some mishap with
the keyboard.

- --
Regards,
Kannan
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEVAwUBSuGeBnlTqcY7ytmIAQLIlgf/TVjuS9NS/eVin1IKGZXRKOug/E8+RDUf
vYMQh01K/RqsYQ6gG7VFU3dxaL/YJHJWKF7ykwkJ0C/zQmmSqO0ml6QHfzf2luVP
M9sMv6Svy8TazGzmnD1kuZdOBW4APNPTICnwALfrN82NhNi0nGk/aANDHiAACcQy
KDi1mme4If+Xph5ke9nPlNWWEbh79wxF2NNyNKIRxYdxgHmaGUxb9G62qQ99iVp0
bZZaOxyq/QxNRiRekvgAwaUBSv8v7mhXRwfXcYIStnZQ++qSry6zdcq6Yof5nulU
ZEpnbAZgbBf5sod6jG1amB+EoOxgcuv7b+EdPblhUlgsG6CBpl7b+g==
=pUr/
-----END PGP SIGNATURE-----

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

Re: [PATCH] Fix some deprecation warnings

Posted by Branko Cibej <br...@xbc.nu>.
Kannan wrote:
> Log:
> Resolve some deprecation warnings and a bit of formatting.
>
> * subversion/libsvn_subr/target.c
>  (svn_path_condense_targets): Use `svn_dirent_get_absolute()',
>  `svn_dirent_get_longest_ancestor()' and `svn_dirent_is_root()'.
>  (svn_path_remove_redundancies): Use `svn_dirent_get_absolute()' and
>  `svn_dirent_is_child()'.
>
> Patch by: Kannan R <ka...@collab.net>
>   
> @@ -121,8 +121,8 @@
> abs_targets_i = APR_ARRAY_IDX(abs_targets, i, const char *);
> abs_targets_j = APR_ARRAY_IDX(abs_targets, j, const char *);
> - ancestor = svn_path_get_longest_ancestor
> - (abs_targets_i, abs_targets_j, pool);
> + ancestor = svn_dirent_get_longest_ancestor
> + (abs_targets_i, abs_targets_j, pool);
> if (*ancestor == '\0')
> continue;

I'm curious -- why this change? The original indentation looks correct,
although I would have expected the opening parenthesis to be at the end
of the previous line.

-- Brane

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