You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Philip Martin <ph...@codematters.co.uk> on 2009/02/16 23:02:40 UTC

Re: svn commit: r35897 - trunk/subversion/libsvn_wc

"Hyrum K. Wright" <hy...@hyrumwright.org> writes:

> Author: hwright
> Date: Mon Feb 16 13:13:32 2009
> New Revision: 35897
>
> Log:
> Further simplify switched status calculation, followup to r35893.
>
> * subversion/libsvn_wc/status.c
>   (assemble_status): Something is switched if
>   "parent-url + basename(path) != entry->url".
>
> Suggested by: gstein
>
> Modified:
>    trunk/subversion/libsvn_wc/status.c
>
> Modified: trunk/subversion/libsvn_wc/status.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_wc/status.c?pathrev=35897&r1=35896&r2=35897
> ==============================================================================
> --- trunk/subversion/libsvn_wc/status.c	Mon Feb 16 12:36:44 2009	(r35896)
> +++ trunk/subversion/libsvn_wc/status.c	Mon Feb 16 13:13:32 2009	(r35897)
> @@ -372,15 +372,12 @@ assemble_status(svn_wc_status2_t **statu
>             entry != parent_entry)
>      {
>        /* An item is switched if:
> -         its working copy basename differs from the basename of its URL,
> -         OR
> -         its URL, without the basename, does not equal its parent's URL. */
> +         parent-url + basename(path) != entry->url  */

POSIX basename need not be reentrant or thread-safe and it might
return a pointer to static storage or modify the argument.

http://www.opengroup.org/onlinepubs/000095399/functions/basename.html

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

Re: svn commit: r35897 - trunk/subversion/libsvn_wc

Posted by Greg Stein <gs...@gmail.com>.
On Tue, Feb 17, 2009 at 00:02, Philip Martin <ph...@codematters.co.uk> wrote:
> "Hyrum K. Wright" <hy...@hyrumwright.org> writes:
>
>> Author: hwright
>> Date: Mon Feb 16 13:13:32 2009
>> New Revision: 35897
>>
>> Log:
>> Further simplify switched status calculation, followup to r35893.
>>
>> * subversion/libsvn_wc/status.c
>>   (assemble_status): Something is switched if
>>   "parent-url + basename(path) != entry->url".
>>
>> Suggested by: gstein
>>
>> Modified:
>>    trunk/subversion/libsvn_wc/status.c
>>
>> Modified: trunk/subversion/libsvn_wc/status.c
>> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_wc/status.c?pathrev=35897&r1=35896&r2=35897
>> ==============================================================================
>> --- trunk/subversion/libsvn_wc/status.c       Mon Feb 16 12:36:44 2009        (r35896)
>> +++ trunk/subversion/libsvn_wc/status.c       Mon Feb 16 13:13:32 2009        (r35897)
>> @@ -372,15 +372,12 @@ assemble_status(svn_wc_status2_t **statu
>>             entry != parent_entry)
>>      {
>>        /* An item is switched if:
>> -         its working copy basename differs from the basename of its URL,
>> -         OR
>> -         its URL, without the basename, does not equal its parent's URL. */
>> +         parent-url + basename(path) != entry->url  */
>
> POSIX basename need not be reentrant or thread-safe and it might
> return a pointer to static storage or modify the argument.

That's just a comment. The actual code uses svn_path_basename()

Cheers,
-g

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