subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r1199278 - /subversion/trunk/subversion/svn/merge-cmd.c
Date Tue, 08 Nov 2011 15:12:34 GMT
Author: julianfoad
Date: Tue Nov  8 15:12:33 2011
New Revision: 1199278

URL: http://svn.apache.org/viewvc?rev=1199278&view=rev
Log:
* subversion/svn/merge-cmd.c
  (svn_cl__merge): Move the reintegrate invocation to its own branch of the
    main if statement for clarity, since it doesn't need the
    revision range calculation.

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

Modified: subversion/trunk/subversion/svn/merge-cmd.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/merge-cmd.c?rev=1199278&r1=1199277&r2=1199278&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/merge-cmd.c (original)
+++ subversion/trunk/subversion/svn/merge-cmd.c Tue Nov  8 15:12:33 2011
@@ -291,7 +291,15 @@ svn_cl__merge(apr_getopt_t *os,
                                   "with --reintegrate"));
     }
 
-  if (! two_sources_specified) /* TODO: Switch order of if */
+  if (opt_state->reintegrate)
+    {
+      err = svn_client_merge_reintegrate(sourcepath1,
+                                         &peg_revision1,
+                                         targetpath,
+                                         opt_state->dry_run,
+                                         options, ctx, pool);
+    }
+  else if (! two_sources_specified)
     {
       /* If we don't have at least one valid revision range, pick a
          good one that spans the entire set of revisions on our
@@ -307,26 +315,19 @@ svn_cl__merge(apr_getopt_t *os,
           APR_ARRAY_PUSH(ranges_to_merge, svn_opt_revision_range_t *) = range;
         }
 
-      if (opt_state->reintegrate)
-        err = svn_client_merge_reintegrate(sourcepath1,
-                                           &peg_revision1,
-                                           targetpath,
-                                           opt_state->dry_run,
-                                           options, ctx, pool);
-      else
-        err = svn_client_merge_peg4(sourcepath1,
-                                    ranges_to_merge,
-                                    &peg_revision1,
-                                    targetpath,
-                                    opt_state->depth,
-                                    opt_state->ignore_ancestry,
-                                    opt_state->force,
-                                    opt_state->record_only,
-                                    opt_state->dry_run,
-                                    opt_state->allow_mixed_rev,
-                                    options,
-                                    ctx,
-                                    pool);
+      err = svn_client_merge_peg4(sourcepath1,
+                                  ranges_to_merge,
+                                  &peg_revision1,
+                                  targetpath,
+                                  opt_state->depth,
+                                  opt_state->ignore_ancestry,
+                                  opt_state->force,
+                                  opt_state->record_only,
+                                  opt_state->dry_run,
+                                  opt_state->allow_mixed_rev,
+                                  options,
+                                  ctx,
+                                  pool);
     }
   else
     {



Mime
View raw message