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

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

From: Hyrum K. Wright <hyrum_wright_at_mail.utexas.edu>
Date: Mon, 16 Feb 2009 15:13:51 -0600

On Feb 16, 2009, at 2:27 PM, Greg Stein wrote:

> On Mon, Feb 16, 2009 at 21:24, Hyrum K. Wright
> <hyrum_at_hyrumwright.org> wrote:
>> ...
>> +++ trunk/subversion/libsvn_wc/status.c Mon Feb 16 12:24:27
>> 2009 (r35893)
>> @@ -371,18 +371,16 @@ assemble_status(svn_wc_status2_t **statu
>> else if (entry->url && parent_entry && parent_entry->url &&
>> entry != parent_entry)
>> {
>> - /* An item is switched if its working copy basename differs
>> from the
>> - basename of its URL. */
>> - if (strcmp(svn_path_uri_encode(svn_path_basename(path,
>> pool), pool),
>> - svn_path_basename(entry->url, pool)))
>> - switched_p = TRUE;
>> -
>> - /* An item is switched if its URL, without the basename,
>> does not
>> - equal its parent's URL. */
>> - if (! switched_p
>> - && strcmp(svn_path_dirname(entry->url, pool),
>> - parent_entry->url))
>> - switched_p = TRUE;
>> + /* 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. */
>> +
>> + switched_p = (strcmp(
>> + svn_path_uri_encode(svn_path_basename(path,
>> pool), pool),
>> + svn_path_basename(entry->url, pool)) != 0)
>> + || (strcmp(svn_path_dirname(entry->url, pool),
>> + parent_entry->url) != 0);
>> }
>
> The simpler test is:
>
> switched_p = (parent-url + basename(path)) != entry->url
>
> iow, if the implied URL is different from the actual, then it has
> been switched.

Good point. Updated in r35897.

-Hyrum

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1173273
Received on 2009-02-16 22:14:12 CET

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.