You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2012/05/31 18:44:47 UTC

svn commit: r1344809 - /subversion/trunk/subversion/libsvn_wc/merge.c

Author: stsp
Date: Thu May 31 16:44:47 2012
New Revision: 1344809

URL: http://svn.apache.org/viewvc?rev=1344809&view=rev
Log:
* subversion/libsvn_wc/merge.c
  (merge_file_trivial): When comparing the working file's content to the
   merge-left content, use the detranslated form of the working files's
   content. Else, there will be spurious content mismatches in case the
   working file has keywords expanded (the merge-left content is in
   repository-normal form). Add a new paramter DETRANSLATED_TARGET_ABSPATH
   for this purpose.
 (svn_wc__internal_merge): Pass down the detranslated_target_abspath to
  merge_file_trivial().

Modified:
    subversion/trunk/subversion/libsvn_wc/merge.c

Modified: subversion/trunk/subversion/libsvn_wc/merge.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/merge.c?rev=1344809&r1=1344808&r2=1344809&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/merge.c (original)
+++ subversion/trunk/subversion/libsvn_wc/merge.c Thu May 31 16:44:47 2012
@@ -926,9 +926,10 @@ maybe_resolve_conflicts(svn_skel_t **wor
 
 
 /* Attempt a trivial merge of LEFT_ABSPATH and RIGHT_ABSPATH to TARGET_ABSPATH.
- * The merge is trivial if the file at LEFT_ABSPATH equals TARGET_ABSPATH,
- * because in this case the content of RIGHT_ABSPATH can be copied to the
- * target. On success, set *MERGE_OUTCOME to SVN_WC_MERGE_MERGED in case the
+ * The merge is trivial if the file at LEFT_ABSPATH equals the detranslated
+ * form of the target at DETRANSLATED_TARGET_ABSPATH, because in this case
+ * the content of RIGHT_ABSPATH can be copied to the target.
+ * On success, set *MERGE_OUTCOME to SVN_WC_MERGE_MERGED in case the
  * target was changed, or to SVN_WC_MERGE_UNCHANGED if the target was not
  * changed. Install work queue items allocated in RESULT_POOL in *WORK_ITEMS.
  * On failure, set *MERGE_OUTCOME to SVN_WC_MERGE_NO_MERGE. */
@@ -938,6 +939,7 @@ merge_file_trivial(svn_skel_t **work_ite
                    const char *left_abspath,
                    const char *right_abspath,
                    const char *target_abspath,
+                   const char *detranslated_target_abspath,
                    svn_boolean_t dry_run,
                    svn_wc__db_t *db,
                    apr_pool_t *result_pool,
@@ -960,7 +962,8 @@ merge_file_trivial(svn_skel_t **work_ite
   /* If the LEFT side of the merge is equal to WORKING, then we can
    * copy RIGHT directly. */
   SVN_ERR(svn_io_files_contents_same_p(&same_contents, left_abspath,
-                                       target_abspath, scratch_pool));
+                                       detranslated_target_abspath,
+                                       scratch_pool));
   if (same_contents)
     {
       /* Check whether the left side equals the right side.
@@ -1418,8 +1421,8 @@ svn_wc__internal_merge(svn_skel_t **work
 
   SVN_ERR(merge_file_trivial(work_items, merge_outcome,
                              left_abspath, right_abspath,
-                             target_abspath, dry_run, db,
-                             result_pool, scratch_pool));
+                             target_abspath, detranslated_target_abspath,
+                             dry_run, db, result_pool, scratch_pool));
   if (*merge_outcome == svn_wc_merge_no_merge)
     {
       if (is_binary)