subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julianf...@apache.org
Subject svn commit: r1471153 - /subversion/trunk/subversion/svn/conflict-callbacks.c
Date Tue, 23 Apr 2013 21:31:07 GMT
Author: julianfoad
Date: Tue Apr 23 21:31:06 2013
New Revision: 1471153

URL: http://svn.apache.org/r1471153
Log:
Change the diff labels shown by the 'df' option in interactive conflict
resolution, to have the filename first, then a tab, a dash, a space, and
finally the descriptive label such as 'MINE' or 'MERGED', to be more
compatible with standard 'patch' tools.  A follow-up to r1470238.

Suggested by: danielsh

* subversion/include/svn_client.h
  (show_diff): Change the diff labels as above, and factor out repeated
    code for preparing the labels.

Modified:
    subversion/trunk/subversion/svn/conflict-callbacks.c

Modified: subversion/trunk/subversion/svn/conflict-callbacks.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/conflict-callbacks.c?rev=1471153&r1=1471152&r2=1471153&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/conflict-callbacks.c (original)
+++ subversion/trunk/subversion/svn/conflict-callbacks.c Tue Apr 23 21:31:06 2013
@@ -149,36 +149,33 @@ show_diff(const svn_wc_conflict_descript
       if (desc->operation == svn_wc_operation_merge)
         {
           path1 = desc->my_abspath;
-          label1 = apr_psprintf(pool, _("MINE - %s"),
-                                svn_cl__local_style_skip_ancestor(
-                                  path_prefix, path1, pool));
+          label1 = _("MINE");
         }
       else
         {
           path1 = desc->their_abspath;
-          label1 = apr_psprintf(pool, _("THEIRS - %s"),
-                                svn_cl__local_style_skip_ancestor(
-                                  path_prefix, path1, pool));
+          label1 = _("THEIRS");
         }
       path2 = desc->merged_file;
-      label2 = apr_psprintf(pool, _("MERGED - %s"),
-                            svn_cl__local_style_skip_ancestor(
-                              path_prefix, path2, pool));
+      label2 = _("MERGED");
     }
   else
     {
       /* There's no merged file, but we can show the
          difference between mine and theirs. */
       path1 = desc->their_abspath;
-      label1 = apr_psprintf(pool, _("THEIRS - %s"),
-                            svn_cl__local_style_skip_ancestor(
-                              path_prefix, path1, pool));
+      label1 = _("THEIRS");
       path2 = desc->my_abspath;
-      label2 = apr_psprintf(pool, _("MINE - %s"),
-                            svn_cl__local_style_skip_ancestor(
-                              path_prefix, path2, pool));
+      label2 = _("MINE");
     }
 
+  label1 = apr_psprintf(pool, "%s\t- %s",
+                        svn_cl__local_style_skip_ancestor(
+                          path_prefix, path1, pool), label1);
+  label2 = apr_psprintf(pool, "%s\t- %s",
+                        svn_cl__local_style_skip_ancestor(
+                          path_prefix, path2, pool), label2);
+
   options = svn_diff_file_options_create(pool);
   options->ignore_eol_style = TRUE;
   SVN_ERR(svn_stream_for_stdout(&output, pool));



Mime
View raw message