You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2012/04/25 15:23:39 UTC
svn commit: r1330271 - /subversion/trunk/subversion/libsvn_client/diff.c
Author: stsp
Date: Wed Apr 25 13:23:39 2012
New Revision: 1330271
URL: http://svn.apache.org/viewvc?rev=1330271&view=rev
Log:
Code cleanup refactoring, no functional change.
* subversion/libsvn_client/diff.c
(check_paths): Merge common if-else code paths.
Modified:
subversion/trunk/subversion/libsvn_client/diff.c
Modified: subversion/trunk/subversion/libsvn_client/diff.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/diff.c?rev=1330271&r1=1330270&r2=1330271&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/diff.c (original)
+++ subversion/trunk/subversion/libsvn_client/diff.c Wed Apr 25 13:23:39 2012
@@ -1439,25 +1439,18 @@ check_paths(svn_boolean_t *is_repos1,
((revision2->kind == svn_opt_revision_base)
|| (revision2->kind == svn_opt_revision_working));
- if (peg_revision->kind != svn_opt_revision_unspecified)
- {
- if (is_local_rev1 && is_local_rev2)
- return svn_error_create(SVN_ERR_CLIENT_BAD_REVISION, NULL,
- _("At least one revision must be non-local "
- "for a pegged diff"));
-
- *is_repos1 = ! is_local_rev1 || svn_path_is_url(path_or_url1);
- *is_repos2 = ! is_local_rev2 || svn_path_is_url(path_or_url2);
- }
- else
- {
- /* Working copy paths with non-local revisions get turned into
- URLs. We don't do that here, though. We simply record that it
- needs to be done, which is information that helps us choose our
- diff helper function. */
- *is_repos1 = ! is_local_rev1 || svn_path_is_url(path_or_url1);
- *is_repos2 = ! is_local_rev2 || svn_path_is_url(path_or_url2);
- }
+ if (peg_revision->kind != svn_opt_revision_unspecified &&
+ is_local_rev1 && is_local_rev2)
+ return svn_error_create(SVN_ERR_CLIENT_BAD_REVISION, NULL,
+ _("At least one revision must be non-local "
+ "for a pegged diff"));
+
+ /* Working copy paths with non-local revisions get turned into
+ URLs. We don't do that here, though. We simply record that it
+ needs to be done, which is information that helps us choose our
+ diff helper function. */
+ *is_repos1 = ! is_local_rev1 || svn_path_is_url(path_or_url1);
+ *is_repos2 = ! is_local_rev2 || svn_path_is_url(path_or_url2);
return SVN_NO_ERROR;
}