Author: julianfoad
Date: Wed Dec  5 22:45:48 2012
New Revision: 1417680

URL: http://svn.apache.org/viewvc?rev=1417680&view=rev
Log:
* subversion/libsvn_wc/wc_db_update_move.c
  (update_working_file, tc_editor_alter_file, update_moved_away_file):
    Regularize the names of parameters and variables.

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

Modified: subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c?rev=1417680&r1=1417679&r2=1417680&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c (original)
+++ subversion/trunk/subversion/libsvn_wc/wc_db_update_move.c Wed Dec  5 
22:45:48 2012
@@ -194,21 +194,21 @@ check_shadowed_node(svn_boolean_t *is_sh
   return SVN_NO_ERROR;
 }
 
-/* Update text and prop contents of the working file at DST_RELPATH
+/* Update text and prop contents of the working file at LOCAL_RELPATH
  * in the working copy at WCROOT, from OLD_VERSION to NEW_VERSION,
  * based on pristine contents identified by MOVE_SRC_CHECKSUM and
- * MOVE_DST_CHECKSUM. MOVE_DST_REPOS_RELPATH is the repository path 
- * the node at DST_RELPATH would be committed to.
+ * MOVE_DST_CHECKSUM. REPOS_RELPATH is the repository path 
+ * the node at LOCAL_RELPATH would be committed to.
  * Use working copy database DB.
  * Use NOTIFY_FUNC and NOTIFY_BATON for notifications.
  * Add any required work items to *WORK_ITEMS, allocated in RESULT_POOL.
  * Use SCRATCH_POOL for temporary allocations. */
 static svn_error_t *
 update_working_file(svn_skel_t **work_items,
-                    const char *dst_relpath,
-                    const char *move_dst_repos_relpath,
-                    const svn_checksum_t *move_src_checksum,
-                    const svn_checksum_t *move_dst_checksum,
+                    const char *local_relpath,
+                    const char *repos_relpath,
+                    const svn_checksum_t *new_checksum,
+                    const svn_checksum_t *old_checksum,
                     svn_wc_conflict_version_t *old_version,
                     svn_wc_conflict_version_t *new_version,
                     svn_wc__db_wcroot_t *wcroot,
@@ -219,7 +219,7 @@ update_working_file(svn_skel_t **work_it
                     apr_pool_t *scratch_pool)
 {
   const char *moved_to_abspath = svn_dirent_join(wcroot->abspath,
-                                                 dst_relpath,
+                                                 local_relpath,
                                                  scratch_pool);
   const char *pre_update_pristine_abspath;
   const char *post_update_pristine_abspath;
@@ -236,11 +236,11 @@ update_working_file(svn_skel_t **work_it
    */
   SVN_ERR(svn_wc__db_pristine_get_path(&pre_update_pristine_abspath,
                                        db, wcroot->abspath,
-                                       move_dst_checksum,
+                                       old_checksum,
                                        scratch_pool, scratch_pool));
   SVN_ERR(svn_wc__db_pristine_get_path(&post_update_pristine_abspath,
                                        db, wcroot->abspath,
-                                       move_src_checksum,
+                                       new_checksum,
                                        scratch_pool, scratch_pool));
   SVN_ERR(svn_wc__internal_merge(work_items, &conflict_skel,
                                  &merge_outcome, db,
@@ -266,7 +266,7 @@ update_working_file(svn_skel_t **work_it
         {
           original_version = svn_wc_conflict_version_dup(old_version,
                                                          scratch_pool);
-          original_version->path_in_repos = move_dst_repos_relpath;
+          original_version->path_in_repos = repos_relpath;
           original_version->node_kind = svn_node_file;
           SVN_ERR(svn_wc__conflict_skel_set_op_update(conflict_skel,
                                                       original_version,
@@ -309,13 +309,16 @@ update_working_file(svn_skel_t **work_it
 }
 
 
+/* Edit the file found at the move destination, which is initially at
+ * the old state.  Merge the changes into the "working"/"actual" file.
+ */
 static svn_error_t *
 tc_editor_alter_file(void *baton,
                      const char *dst_relpath,
                      svn_revnum_t expected_move_dst_revision,
-                     apr_hash_t *props,
-                     const svn_checksum_t *move_src_checksum,
-                     svn_stream_t *post_update_contents,
+                     apr_hash_t *new_props,
+                     const svn_checksum_t *new_checksum,
+                     svn_stream_t *new_contents,
                      apr_pool_t *scratch_pool)
 {
   struct tc_editor_baton *b = baton;
@@ -338,7 +341,7 @@ tc_editor_alter_file(void *baton,
   /* ### TODO update revision etc. in NODES table */
 
   /* Update file and prop contents if the update has changed them. */
-  if (!svn_checksum_match(move_src_checksum, move_dst_checksum)
+  if (!svn_checksum_match(new_checksum, move_dst_checksum)
       /* ### || props have changed */)
     {
       svn_boolean_t is_shadowed;
@@ -355,7 +358,7 @@ tc_editor_alter_file(void *baton,
       else
         SVN_ERR(update_working_file(b->work_items, dst_relpath,
                                     move_dst_repos_relpath,
-                                    move_src_checksum, move_dst_checksum,
+                                    new_checksum, move_dst_checksum,
                                     b->old_version, b->new_version,
                                     b->wcroot, b->db,
                                     b->notify_func, b->notify_baton,
@@ -598,35 +601,35 @@ update_moved_away_file(svn_editor_t *tc_
                        apr_pool_t *scratch_pool)
 {
   svn_kind_t kind;
-  svn_stream_t *post_update_contents;
-  const svn_checksum_t *move_src_checksum;
+  svn_stream_t *new_contents;
+  const svn_checksum_t *new_checksum;
 
   /* Read post-update contents from the updated moved-away file and tell
    * the editor to merge them into the moved-here file. */
   SVN_ERR(svn_wc__db_read_pristine_info(NULL, &kind, NULL, NULL, NULL, NULL,
-                                        &move_src_checksum, NULL, NULL, NULL,
+                                        &new_checksum, NULL, NULL, NULL,
                                         db, svn_dirent_join(wcroot->abspath,
                                                             src_relpath,
                                                             scratch_pool),
                                         scratch_pool, scratch_pool));
-  SVN_ERR(svn_wc__db_pristine_read(&post_update_contents, NULL, db,
-                                   wcroot->abspath, move_src_checksum,
+  SVN_ERR(svn_wc__db_pristine_read(&new_contents, NULL, db,
+                                   wcroot->abspath, new_checksum,
                                    scratch_pool, scratch_pool));
-                    
+
   if (add)
     /* FIXME: editor API violation: missing svn_editor_alter_directory. */
     SVN_ERR(svn_editor_add_file(tc_editor, dst_relpath,
-                                move_src_checksum, post_update_contents,
+                                new_checksum, new_contents,
                                 apr_hash_make(scratch_pool), /* ### TODO props 
*/
                                 move_root_dst_revision));
   else
     SVN_ERR(svn_editor_alter_file(tc_editor, dst_relpath,
                                   move_root_dst_revision,
                                   NULL, /* ### TODO props */
-                                  move_src_checksum,
-                                  post_update_contents));
+                                  new_checksum,
+                                  new_contents));
 
-  SVN_ERR(svn_stream_close(post_update_contents));
+  SVN_ERR(svn_stream_close(new_contents));
 
   return SVN_NO_ERROR;
 }


Reply via email to