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

RE: svn commit: r37045 - trunk/subversion/libsvn_wc

From: Bert Huijben <rhuijben_at_sharpsvn.net>
Date: Tue, 7 Apr 2009 11:39:08 +0200

> -----Original Message-----
> From: Senthil Kumaran S [mailto:senthil_at_collab.net]
> Sent: dinsdag 7 april 2009 7:55
> To: svn_at_subversion.tigris.org
> Subject: svn commit: r37045 - trunk/subversion/libsvn_wc
>
> Author: stylesen
> Date: Mon Apr 6 22:54:47 2009
> New Revision: 37045
>
> Log:
> Fix issue #3391.
>
> * subversion/libsvn_wc/crop.c
> (svn_wc_crop_tree): Do not pass NULL to strcmp.
>
> Modified:
> trunk/subversion/libsvn_wc/crop.c
>
> Modified: trunk/subversion/libsvn_wc/crop.c
> URL:
>
http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_wc/crop.c?pathrev=3
70
> 45&r1=37044&r2=37045
>
============================================================================
==
> --- trunk/subversion/libsvn_wc/crop.c Mon Apr 6 21:35:58 2009
(r37044)
> +++ trunk/subversion/libsvn_wc/crop.c Mon Apr 6 22:54:47 2009
(r37045)
> @@ -255,19 +255,22 @@ svn_wc_crop_tree(svn_wc_adm_access_t *an
> if (err)
> svn_error_clear(err);
>
> - switched
> - = parent_entry && strcmp(entry->url,
> - svn_path_url_add_component2
> - (parent_entry->url, bname, pool));
> -
> - /* The server simply do not accept excluded link_path and thus
> - switched path can not be excluede. Just completely prohibit
this
> - situation. */
> - if (switched)
> - return svn_error_createf
> - (SVN_ERR_UNSUPPORTED_FEATURE, NULL,
> - _("Cannot crop '%s': it is a switched path"),
> - svn_path_local_style(full_path, pool));
> + if (entry->url)
> + {
> + switched
> + = parent_entry && strcmp(entry->url,
> + svn_path_url_add_component2
> + (parent_entry->url, bname,
pool));
> +
> + /* The server simply do not accept excluded link_path and
thus
> + switched path cannot be excluded. Just completely
prohibit
> + this situation. */
> + if (switched)
> + return svn_error_createf
> + (SVN_ERR_UNSUPPORTED_FEATURE, NULL,
> + _("Cannot crop '%s': it is a switched path"),
> + svn_path_local_style(full_path, pool));
> + }
> }
>
> /* If the target entry is just added without history, it does not
exist

This whole block could be one large if statement. (The switched variable is
only used here).

if (entry->url && parent_entry && strcmp(...

(and we try not to include spacing before the opening parenthesis of a
function, but that was there before you touched the code)

        Bert

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1574528
Received on 2009-04-07 11:39:27 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.