subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r1442659 - /subversion/trunk/subversion/svn/diff-cmd.c
Date Tue, 05 Feb 2013 16:54:18 GMT
Author: julianfoad
Date: Tue Feb  5 16:54:18 2013
New Revision: 1442659

URL: http://svn.apache.org/viewvc?rev=1442659&view=rev
Log:
* subversion/svn/diff-cmd.c
  (svn_cl__diff): Simplify logic introduced in r1442640.

Modified:
    subversion/trunk/subversion/svn/diff-cmd.c

Modified: subversion/trunk/subversion/svn/diff-cmd.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/diff-cmd.c?rev=1442659&r1=1442658&r2=1442659&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/diff-cmd.c (original)
+++ subversion/trunk/subversion/svn/diff-cmd.c Tue Feb  5 16:54:18 2013
@@ -239,31 +239,15 @@ svn_cl__diff(apr_getopt_t *os,
 
       /* Set default start/end revisions based on target types, in the same
        * manner as done for the corresponding '--old X --new Y' cases. */
-      if (svn_path_is_url(APR_ARRAY_IDX(targets, 0, const char *))
-          && svn_path_is_url(APR_ARRAY_IDX(targets, 1, const char *)))
-        {
-          /* The 'svn diff OLD_URL[@OLDREV] NEW_URL[@NEWREV]' case matches. */
-          if (opt_state->start_revision.kind == svn_opt_revision_unspecified)
-            opt_state->start_revision.kind = svn_opt_revision_head;
-          if (opt_state->end_revision.kind == svn_opt_revision_unspecified)
-            opt_state->end_revision.kind = svn_opt_revision_head;
-        }
-      else if (svn_path_is_url(APR_ARRAY_IDX(targets, 0, const char *)))
-        {
-          /* The 'svn diff OLD_URL[@OLDREV] NEW_PATH[@NEWREV]' case matches. */
-          if (opt_state->start_revision.kind == svn_opt_revision_unspecified)
-            opt_state->start_revision.kind = svn_opt_revision_head;
-          if (opt_state->end_revision.kind == svn_opt_revision_unspecified)
-            opt_state->end_revision.kind = svn_opt_revision_working;
-        }
-      else
-        {
-          /* The 'svn diff OLD_PATH[@OLDREV] NEW_URL[@NEWREV]' case matches. */
-          if (opt_state->start_revision.kind == svn_opt_revision_unspecified)
-            opt_state->start_revision.kind = svn_opt_revision_working;
-          if (opt_state->end_revision.kind == svn_opt_revision_unspecified)
-            opt_state->end_revision.kind = svn_opt_revision_head;
-        }
+      if (opt_state->start_revision.kind == svn_opt_revision_unspecified)
+        opt_state->start_revision.kind
+          = svn_path_is_url(APR_ARRAY_IDX(targets, 0, const char *))
+            ? svn_opt_revision_head : svn_opt_revision_base;
+
+      if (opt_state->end_revision.kind == svn_opt_revision_unspecified)
+        opt_state->end_revision.kind
+          = svn_path_is_url(APR_ARRAY_IDX(targets, 1, const char *))
+            ? svn_opt_revision_head : svn_opt_revision_working;
     }
   else if (opt_state->old_target)
     {



Mime
View raw message