Author: svn-role
Date: Tue Apr 30 04:01:33 2013
New Revision: 1477468

URL: http://svn.apache.org/r1477468
Log:
Merge the r1470238 group from trunk:

 * r1470238, r1471153
   Improve labelling of the file diff in interactive conflict resolution 'df'
   option. Show labels such as "THEIRS" and "MERGED", not just the paths to
   the files on disk.
   Justification:
     It was confusing because the same 'df' option can show a different pair
     of files depending on whether the conflicted operation was an update or
     a merge, and on whether there's a base file or not.
   Votes:
     +1: julianfoad, philip, cmpilato

Modified:
    subversion/branches/1.8.x/   (props changed)
    subversion/branches/1.8.x/STATUS
    subversion/branches/1.8.x/subversion/svn/conflict-callbacks.c

Propchange: subversion/branches/1.8.x/
------------------------------------------------------------------------------
  Merged /subversion/trunk:r1470238,1471153

Modified: subversion/branches/1.8.x/STATUS
URL: 
http://svn.apache.org/viewvc/subversion/branches/1.8.x/STATUS?rev=1477468&r1=1477467&r2=1477468&view=diff
==============================================================================
--- subversion/branches/1.8.x/STATUS (original)
+++ subversion/branches/1.8.x/STATUS Tue Apr 30 04:01:33 2013
@@ -100,14 +100,3 @@ Veto-blocked changes:
 
 Approved changes:
 =================
-
- * r1470238, r1471153
-   Improve labelling of the file diff in interactive conflict resolution 'df'
-   option. Show labels such as "THEIRS" and "MERGED", not just the paths to
-   the files on disk.
-   Justification:
-     It was confusing because the same 'df' option can show a different pair
-     of files depending on whether the conflicted operation was an update or
-     a merge, and on whether there's a base file or not.
-   Votes:
-     +1: julianfoad, philip, cmpilato

Modified: subversion/branches/1.8.x/subversion/svn/conflict-callbacks.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/1.8.x/subversion/svn/conflict-callbacks.c?rev=1477468&r1=1477467&r2=1477468&view=diff
==============================================================================
--- subversion/branches/1.8.x/subversion/svn/conflict-callbacks.c (original)
+++ subversion/branches/1.8.x/subversion/svn/conflict-callbacks.c Tue Apr 30 
04:01:33 2013
@@ -123,9 +123,11 @@ svn_cl__accept_from_word(const char *wor
  * corresponding to the conflict described in DESC. */
 static svn_error_t *
 show_diff(const svn_wc_conflict_description2_t *desc,
+          const char *path_prefix,
           apr_pool_t *pool)
 {
   const char *path1, *path2;
+  const char *label1, *label2;
   svn_diff_t *diff;
   svn_stream_t *output;
   svn_diff_file_options_t *options;
@@ -145,19 +147,35 @@ show_diff(const svn_wc_conflict_descript
        * This way, the diff is always minimal and clearly identifies changes
        * brought into the working copy by the update/switch/merge operation. */
       if (desc->operation == svn_wc_operation_merge)
-        path1 = desc->my_abspath;
+        {
+          path1 = desc->my_abspath;
+          label1 = _("MINE");
+        }
       else
-        path1 = desc->their_abspath;
+        {
+          path1 = desc->their_abspath;
+          label1 = _("THEIRS");
+        }
       path2 = desc->merged_file;
+      label2 = _("MERGED");
     }
   else
     {
       /* There's no merged file, but we can show the
          difference between mine and theirs. */
       path1 = desc->their_abspath;
+      label1 = _("THEIRS");
       path2 = desc->my_abspath;
+      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));
@@ -165,7 +183,7 @@ show_diff(const svn_wc_conflict_descript
                                options, pool));
   return svn_diff_file_output_unified3(output, diff,
                                        path1, path2,
-                                       NULL, NULL,
+                                       label1, label2,
                                        APR_LOCALE_CHARSET,
                                        NULL, FALSE,
                                        pool);
@@ -712,7 +730,7 @@ handle_text_conflict(svn_wc_conflict_res
               continue;
             }
 
-          SVN_ERR(show_diff(desc, iterpool));
+          SVN_ERR(show_diff(desc, b->path_prefix, iterpool));
           knows_something = TRUE;
         }
       else if (strcmp(opt->code, "e") == 0 || strcmp(opt->code, ":-E") == 0)


Reply via email to