You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2010/05/21 17:58:06 UTC

svn commit: r947049 - /subversion/trunk/subversion/libsvn_wc/update_editor.c

Author: julianfoad
Date: Fri May 21 15:58:06 2010
New Revision: 947049

URL: http://svn.apache.org/viewvc?rev=947049&view=rev
Log:
* subversion/libsvn_wc/update_editor.c
  (merge_file): Move a base-path look-up closer to where it's used,
    and break it into its two different uses.

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

Modified: subversion/trunk/subversion/libsvn_wc/update_editor.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/update_editor.c?rev=947049&r1=947048&r2=947049&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/trunk/subversion/libsvn_wc/update_editor.c Fri May 21 15:58:06 2010
@@ -4214,7 +4214,6 @@ merge_file(svn_skel_t **work_items,
   svn_boolean_t magic_props_changed;
   enum svn_wc_merge_outcome_t merge_outcome = svn_wc_merge_unchanged;
   svn_skel_t *work_item;
-  const char *text_base_abspath;
 
   /*
      When this function is called on file F, we assume the following
@@ -4305,10 +4304,6 @@ merge_file(svn_skel_t **work_items,
       && ! entry->file_external_path)  /* ### EBUG */
     is_replaced = TRUE;
 
-  SVN_ERR(svn_wc__ultimate_base_text_path(&text_base_abspath,
-                                          eb->db, fb->local_abspath,
-                                          pool, pool));
-
   /* For 'textual' merging, we implement this matrix.
 
                                  Text file                  Binary File
@@ -4441,7 +4436,8 @@ merge_file(svn_skel_t **work_items,
               else if (fb->copied_text_base_abspath)
                 merge_left = fb->copied_text_base_abspath;
               else
-                merge_left = text_base_abspath;
+                SVN_ERR(svn_wc__ultimate_base_text_path_to_read(
+                  &merge_left, eb->db, fb->local_abspath, pool, pool));
 
               /* Merge the changes from the old textbase to the new
                  textbase into the file we're updating.
@@ -4534,9 +4530,14 @@ merge_file(svn_skel_t **work_items,
 #ifndef SVN_EXPERIMENTAL_PRISTINE
   if (new_text_base_tmp_abspath)
     {
+      const char *text_base_abspath;
+
       /* Move the temp text-base file to its final destination.
        * text_base_abspath is the appropriate path: the "revert-base" path
        * if the node is replaced, else the usual text-base path. */
+      SVN_ERR(svn_wc__ultimate_base_text_path(&text_base_abspath,
+                                          eb->db, fb->local_abspath,
+                                          pool, pool));
       SVN_ERR(svn_wc__loggy_move(&work_item, eb->db, pb->local_abspath,
                                  new_text_base_tmp_abspath,
                                  text_base_abspath,