subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1438883 - in /subversion/branches/1.7.x-r1438879: ./ subversion/svn/conflict-callbacks.c
Date Sat, 26 Jan 2013 11:54:09 GMT
Author: stsp
Date: Sat Jan 26 11:54:08 2013
New Revision: 1438883

URL: http://svn.apache.org/viewvc?rev=1438883&view=rev
Log:
On the 1.7.x-r1438879 branch, merge r1438879, resolving conflicts.

* subversion/svn/conflict-callbacks.c
  (show_diff): This function expects svn_wc_conflict_description_t in 1.7.x,
   not svn_wc_conflict_description2_t as it does on trunk. Some struct members
   have changed names in the second revision of the struct but contain the
   same data. Use appropriate names to access these members.

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

Propchange: subversion/branches/1.7.x-r1438879/
------------------------------------------------------------------------------
  Merged /subversion/trunk:r1438879

Modified: subversion/branches/1.7.x-r1438879/subversion/svn/conflict-callbacks.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-r1438879/subversion/svn/conflict-callbacks.c?rev=1438883&r1=1438882&r2=1438883&view=diff
==============================================================================
--- subversion/branches/1.7.x-r1438879/subversion/svn/conflict-callbacks.c (original)
+++ subversion/branches/1.7.x-r1438879/subversion/svn/conflict-callbacks.c Sat Jan 26 11:54:08
2013
@@ -92,8 +92,8 @@ svn_cl__accept_from_word(const char *wor
 }
 
 
-/* Print on stdout a diff between the 'base' and 'merged' files, if both of
- * those are available, else between 'their' and 'my' files, of DESC. */
+/* Print on stdout a diff that shows incoming conflicting changes
+ * corresponding to the conflict described in DESC. */
 static svn_error_t *
 show_diff(const svn_wc_conflict_description_t *desc,
           apr_pool_t *pool)
@@ -103,15 +103,29 @@ show_diff(const svn_wc_conflict_descript
   svn_stream_t *output;
   svn_diff_file_options_t *options;
 
-  if (desc->merged_file && desc->base_file)
+  if (desc->merged_file)
     {
-      /* Show the conflict markers to the user */
-      path1 = desc->base_file;
+      /* For conflicts recorded by the 'merge' operation, show a diff between
+       * 'mine' (the working version of the file as it appeared before the
+       * 'merge' operation was run) and 'merged' (the version of the file
+       * as it appears after the merge operation).
+       *
+       * For conflicts recorded by the 'update' and 'switch' operations,
+       * show a diff beween 'theirs' (the new pristine version of the
+       * file) and 'merged' (the version of the file as it appears with
+       * local changes merged with the new pristine version).
+       *
+       * 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_file;
+      else
+        path1 = desc->their_file;
       path2 = desc->merged_file;
     }
   else
     {
-      /* There's no base file, but we can show the
+      /* There's no merged file, but we can show the
          difference between mine and theirs. */
       path1 = desc->their_file;
       path2 = desc->my_file;



Mime
View raw message