You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by cm...@apache.org on 2010/12/10 20:37:45 UTC
svn commit: r1044488 - /subversion/trunk/subversion/libsvn_client/util.c
Author: cmpilato
Date: Fri Dec 10 19:37:44 2010
New Revision: 1044488
URL: http://svn.apache.org/viewvc?rev=1044488&view=rev
Log:
Minor optimization of the are-the-targets-all-the-same check.
* subversion/libsvn_client/util.c
(svn_client__assert_homogeneous_target_type): Make the error-state
determination as early as possible, avoiding unnecessary checks.
Modified:
subversion/trunk/subversion/libsvn_client/util.c
Modified: subversion/trunk/subversion/libsvn_client/util.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/util.c?rev=1044488&r1=1044487&r2=1044488&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/util.c (original)
+++ subversion/trunk/subversion/libsvn_client/util.c Fri Dec 10 19:37:44 2010
@@ -335,12 +335,11 @@ svn_client__assert_homogeneous_target_ty
wc_present = TRUE;
else
url_present = TRUE;
+ if (url_present && wc_present)
+ return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
+ _("Cannot mix repository and working copy "
+ "targets"));
}
- if (url_present && wc_present)
- return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
- _("Cannot mix repository and working copy "
- "targets"));
-
return SVN_NO_ERROR;
}