subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r1189754 - in /subversion/branches/showing-merge-info/subversion: libsvn_client/merge.c svn/merge-cmd.c
Date Thu, 27 Oct 2011 13:41:48 GMT
Author: julianfoad
Date: Thu Oct 27 13:41:48 2011
New Revision: 1189754

URL: http://svn.apache.org/viewvc?rev=1189754&view=rev
Log:
On the 'showing-merge-info' branch: Print nicer messages about the kind of merge
being done.

* subversion/libsvn_client/merge.c
  (merge_reintegrate_locked): Print the message about the equivalent two-URL
    merge more nicely.

* subversion/svn/merge-cmd.c
  (svn_cl__mergeinfo): Print a message about what kind of merge is being done.

Modified:
    subversion/branches/showing-merge-info/subversion/libsvn_client/merge.c
    subversion/branches/showing-merge-info/subversion/svn/merge-cmd.c

Modified: subversion/branches/showing-merge-info/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/libsvn_client/merge.c?rev=1189754&r1=1189753&r2=1189754&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/libsvn_client/merge.c (original)
+++ subversion/branches/showing-merge-info/subversion/libsvn_client/merge.c Thu Oct 27 13:41:48
2011
@@ -10740,11 +10740,12 @@ merge_reintegrate_locked(const char *sou
 
   /* Left side: trunk@youngest-trunk-rev-merged-to-branch-at-specified-peg-rev
    * Right side: branch@specified-peg-revision */
-  printf(_("The reintegrate merge will be equivalent to:\n"
-           "  merge --old=%s@%ld\n"
-           "        --new=%s@%ld\n"
-           "  ### (this is experimental)\n"),
-         url1, rev1, url2, rev2);
+  {
+    printf(_("The reintegrate merge will be equivalent to:\n"
+             "  merge ^/%s@%ld ^/%s@%ld\n"),
+           svn_uri_skip_ancestor(source_repos_root, url1, scratch_pool), rev1,
+           svn_uri_skip_ancestor(source_repos_root, url2, scratch_pool), rev2);
+  }
 
   /* Do the real merge! */
   /* ### TODO(reint): Make sure that one isn't the same line ancestor

Modified: subversion/branches/showing-merge-info/subversion/svn/merge-cmd.c
URL: http://svn.apache.org/viewvc/subversion/branches/showing-merge-info/subversion/svn/merge-cmd.c?rev=1189754&r1=1189753&r2=1189754&view=diff
==============================================================================
--- subversion/branches/showing-merge-info/subversion/svn/merge-cmd.c (original)
+++ subversion/branches/showing-merge-info/subversion/svn/merge-cmd.c Thu Oct 27 13:41:48
2011
@@ -328,25 +328,37 @@ svn_cl__merge(apr_getopt_t *os,
         }
 
       if (opt_state->reintegrate)
-        err = svn_client_merge_reintegrate(sourcepath1,
-                                           &peg_revision1,
-                                           targetpath,
-                                           opt_state->dry_run,
-                                           options, ctx, pool);
+        {
+          printf(opt_state->dry_run ? _("Reintegrate dry-run merge\n")
+                                    : _("Reintegrate merge\n"));
+          printf(_("  from '%s' into '%s'\n"),
+                 sourcepath1, targetpath);
+          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);
+        {
+          printf(opt_state->dry_run ? _("Sync or cherry-pick dry-run merge\n")
+                                    : _("Sync or cherry-pick merge\n"));
+          printf(_("  from '%s' to '%s'\n"),
+                 sourcepath1, targetpath);
+          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
     {
@@ -354,6 +366,10 @@ svn_cl__merge(apr_getopt_t *os,
         return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
                                 _("Merge sources must both be "
                                   "either paths or URLs"));
+      printf(opt_state->dry_run ? _("Two-URL dry-run merge\n")
+                                : _("Two-URL merge\n"));
+      printf(_("  from diff between '%s' and '%s' into '%s'\n"),
+             sourcepath1, sourcepath2, targetpath);
       err = svn_client_merge4(sourcepath1,
                               &first_range_start,
                               sourcepath2,



Mime
View raw message