You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Bert Huijben <rh...@sharpsvn.net> on 2009/04/07 09:39:08 UTC

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

> -----Original Message-----
> From: Senthil Kumaran S [mailto:senthil@collab.net]
> Sent: dinsdag 7 april 2009 7:55
> To: svn@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

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

Posted by Senthil Kumaran S <se...@collab.net>.
Bert Huijben wrote:
> 
>> -----Original Message-----
>> From: Senthil Kumaran S [mailto:senthil@collab.net]
>> Sent: dinsdag 7 april 2009 7:55
>> To: svn@subversion.tigris.org
>> Subject: svn commit: r37045 - trunk/subversion/libsvn_wc
>>
>> Author: stylesen
>> Date: Mon Apr  6 22:54:47 2009
>> New Revision: 37045
...
> This whole block could be one large if statement. (The switched variable is
> only used here).

Committed in r37053.

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

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