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 2013/01/16 22:04:31 UTC

svn commit: r1434395 - in /subversion/trunk/subversion/libsvn_wc: merge.c update_editor.c wc.h

Author: julianfoad
Date: Wed Jan 16 21:04:30 2013
New Revision: 1434395

URL: http://svn.apache.org/viewvc?rev=1434395&view=rev
Log:
Rename 'actual_props' to 'old_actual_props' in several libsvn_wc merge
routines, for clarity.

* subversion/libsvn_wc/wc.h
  (svn_wc__internal_merge, svn_wc__perform_file_merge): Rename the
    'actual_props' parameter.

* subversion/libsvn_wc/merge.c
  (merge_target_t, svn_wc__internal_merge, svn_wc_merge5): Rename the
    'actual_props' member/parameter/variable.
  (detranslate_wc_file, merge_text_file): Adjust accordingly.

* subversion/libsvn_wc/update_editor.c
  (svn_wc__perform_file_merge): Rename the 'actual_props' parameter. Fix a
    comment; tweak a comment.

Modified:
    subversion/trunk/subversion/libsvn_wc/merge.c
    subversion/trunk/subversion/libsvn_wc/update_editor.c
    subversion/trunk/subversion/libsvn_wc/wc.h

Modified: subversion/trunk/subversion/libsvn_wc/merge.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/merge.c?rev=1434395&r1=1434394&r2=1434395&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/merge.c (original)
+++ subversion/trunk/subversion/libsvn_wc/merge.c Wed Jan 16 21:04:30 2013
@@ -45,7 +45,7 @@ typedef struct merge_target_t
   const char *local_abspath;                /* The absolute path to target */
   const char *wri_abspath;                  /* The working copy of target */
 
-  apr_hash_t *actual_props;                 /* The set of actual properties
+  apr_hash_t *old_actual_props;                 /* The set of actual properties
                                                before merging */
   const apr_array_header_t *prop_diff;      /* The property changes */
 
@@ -162,7 +162,7 @@ detranslate_wc_file(const char **detrans
   const char *eol;
   apr_hash_t *keywords;
   svn_boolean_t special;
-  const char *mime_value = svn_prop_get_value(mt->actual_props,
+  const char *mime_value = svn_prop_get_value(mt->old_actual_props,
                                               SVN_PROP_MIME_TYPE);
 
   is_binary = (mime_value && svn_mime_type_is_binary(mime_value));
@@ -191,7 +191,7 @@ detranslate_wc_file(const char **detrans
                                          &keywords,
                                          &special,
                                          mt->db, mt->local_abspath,
-                                         mt->actual_props, TRUE,
+                                         mt->old_actual_props, TRUE,
                                          scratch_pool, scratch_pool));
     }
   else
@@ -203,7 +203,7 @@ detranslate_wc_file(const char **detrans
                                          &keywords,
                                          &special,
                                          mt->db, mt->local_abspath,
-                                         mt->actual_props, TRUE,
+                                         mt->old_actual_props, TRUE,
                                          scratch_pool, scratch_pool));
 
       if (special)
@@ -909,7 +909,7 @@ merge_text_file(svn_skel_t **work_items,
          whatever special file types we may invent in the future. */
       SVN_ERR(svn_wc__get_translate_info(NULL, NULL, NULL,
                                          &special, mt->db, mt->local_abspath,
-                                         mt->actual_props, TRUE,
+                                         mt->old_actual_props, TRUE,
                                          pool, pool));
       SVN_ERR(svn_io_files_contents_same_p(&same, result_target,
                                            (special ?
@@ -1073,7 +1073,7 @@ svn_wc__internal_merge(svn_skel_t **work
                        const char *left_label,
                        const char *right_label,
                        const char *target_label,
-                       apr_hash_t *actual_props,
+                       apr_hash_t *old_actual_props,
                        svn_boolean_t dry_run,
                        const char *diff3_cmd,
                        const apr_array_header_t *merge_options,
@@ -1099,7 +1099,7 @@ svn_wc__internal_merge(svn_skel_t **work
   mt.db = db;
   mt.local_abspath = target_abspath;
   mt.wri_abspath = wri_abspath;
-  mt.actual_props = actual_props;
+  mt.old_actual_props = old_actual_props;
   mt.prop_diff = prop_diff;
   mt.diff3_cmd = diff3_cmd;
   mt.merge_options = merge_options;
@@ -1110,7 +1110,7 @@ svn_wc__internal_merge(svn_skel_t **work
     is_binary = svn_mime_type_is_binary(mimeprop->value->data);
   else
     {
-      const char *value = svn_prop_get_value(mt.actual_props,
+      const char *value = svn_prop_get_value(mt.old_actual_props,
                                              SVN_PROP_MIME_TYPE);
 
       is_binary = value && svn_mime_type_is_binary(value);
@@ -1215,7 +1215,7 @@ svn_wc_merge5(enum svn_wc_merge_outcome_
   svn_skel_t *work_items;
   svn_skel_t *conflict_skel = NULL;
   apr_hash_t *pristine_props = NULL;
-  apr_hash_t *actual_props;
+  apr_hash_t *old_actual_props;
   apr_hash_t *new_actual_props = NULL;
 
   SVN_ERR_ASSERT(svn_dirent_is_absolute(left_abspath));
@@ -1287,14 +1287,14 @@ svn_wc_merge5(enum svn_wc_merge_outcome_
 
     if (props_mod)
       {
-        SVN_ERR(svn_wc__db_read_props(&actual_props,
+        SVN_ERR(svn_wc__db_read_props(&old_actual_props,
                                       wc_ctx->db, target_abspath,
                                       scratch_pool, scratch_pool));
       }
     else if (pristine_props)
-      actual_props = pristine_props;
+      old_actual_props = pristine_props;
     else
-      actual_props = apr_hash_make(scratch_pool);
+      old_actual_props = apr_hash_make(scratch_pool);
   }
 
   /* Merge the properties, if requested.  We merge the properties first
@@ -1323,7 +1323,7 @@ svn_wc_merge5(enum svn_wc_merge_outcome_
                                   merge_props_outcome,
                                   &new_actual_props,
                                   wc_ctx->db, target_abspath,
-                                  original_props, pristine_props, actual_props,
+                                  original_props, pristine_props, old_actual_props,
                                   prop_diff,
                                   scratch_pool, scratch_pool));
     }
@@ -1338,7 +1338,7 @@ svn_wc_merge5(enum svn_wc_merge_outcome_
                                  target_abspath,
                                  target_abspath,
                                  left_label, right_label, target_label,
-                                 actual_props,
+                                 old_actual_props,
                                  dry_run,
                                  diff3_cmd,
                                  merge_options,

Modified: subversion/trunk/subversion/libsvn_wc/update_editor.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/update_editor.c?rev=1434395&r1=1434394&r2=1434395&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/trunk/subversion/libsvn_wc/update_editor.c Wed Jan 16 21:04:30 2013
@@ -3672,7 +3672,7 @@ change_file_prop(void *file_baton,
    identified by WRI_ABSPATH. Use OLD_REVISION and TARGET_REVISION for naming
    the intermediate files.
 
-   The rest of the arguments are passed to svn_wc__internal_merge.
+   The rest of the arguments are passed to svn_wc__internal_merge().
  */
 svn_error_t *
 svn_wc__perform_file_merge(svn_skel_t **work_items,
@@ -3683,7 +3683,7 @@ svn_wc__perform_file_merge(svn_skel_t **
                            const char *wri_abspath,
                            const svn_checksum_t *new_checksum,
                            const svn_checksum_t *original_checksum,
-                           apr_hash_t *actual_props,
+                           apr_hash_t *old_actual_props,
                            const apr_array_header_t *ext_patterns,
                            svn_revnum_t old_revision,
                            svn_revnum_t target_revision,
@@ -3695,7 +3695,7 @@ svn_wc__perform_file_merge(svn_skel_t **
                            apr_pool_t *scratch_pool)
 {
   /* Actual file exists and has local mods:
-     Now we need to let loose svn_wc__merge_internal() to merge
+     Now we need to let loose svn_wc__internal_merge() to merge
      the textual changes into the working file. */
   const char *oldrev_str, *newrev_str, *mine_str;
   const char *merge_left;
@@ -3764,7 +3764,7 @@ svn_wc__perform_file_merge(svn_skel_t **
                                  local_abspath,
                                  wri_abspath,
                                  oldrev_str, newrev_str, mine_str,
-                                 actual_props,
+                                 old_actual_props,
                                  FALSE /* dry_run */,
                                  diff3_cmd, NULL, propchanges,
                                  cancel_func, cancel_baton,

Modified: subversion/trunk/subversion/libsvn_wc/wc.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc.h?rev=1434395&r1=1434394&r2=1434395&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc.h (original)
+++ subversion/trunk/subversion/libsvn_wc/wc.h Wed Jan 16 21:04:30 2013
@@ -418,12 +418,12 @@ svn_wc__internal_file_modified_p(svn_boo
    WRI_ABSPATH describes in which working copy information should be
    retrieved. (Interesting for merging file externals).
 
-   ACTUAL_PROPS is the set of actual properties before merging; used for
+   OLD_ACTUAL_PROPS is the set of actual properties before merging; used for
    detranslating the file before merging.  This is necessary because, in
    the case of updating, the update can have sent new properties, so we
    cannot simply fetch and use the current actual properties.
 
-     ### Is ACTUAL_PROPS still necessary, now that we first prepare the
+     ### Is OLD_ACTUAL_PROPS still necessary, now that we first prepare the
          content change and property change and then apply them both to
          the WC together?
 
@@ -447,7 +447,7 @@ svn_wc__internal_merge(svn_skel_t **work
                        const char *left_label,
                        const char *right_label,
                        const char *target_label,
-                       apr_hash_t *actual_props,
+                       apr_hash_t *old_actual_props,
                        svn_boolean_t dry_run,
                        const char *diff3_cmd,
                        const apr_array_header_t *merge_options,
@@ -713,7 +713,7 @@ svn_wc__perform_file_merge(svn_skel_t **
                            const char *wri_abspath,
                            const svn_checksum_t *new_checksum,
                            const svn_checksum_t *original_checksum,
-                           apr_hash_t *actual_props,
+                           apr_hash_t *old_actual_props,
                            const apr_array_header_t *ext_patterns,
                            svn_revnum_t old_revision,
                            svn_revnum_t target_revision,