[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] fix for merge-tests 30

From: Lieven Govaerts <lgo_at_mobsol.be>
Date: 2007-01-08 23:40:10 CET

Attached patch fixes merge test nr. 30 'merge_dir_replace'. The test
fails on trunk and 1.4.x in the post-commit phase when that commit
contains a replaced directory.

I've expanded the test a bit to catch some extra situations.

While the patch fixes the test, I'm not so sure if it's the best
solution. Can you have a look at it?

Lieven

[[[
Fix for issue 2607: when processing a replaced directory in the post-commit
phase, deleted files in that directory will still be in the entries file.
Don't process them twice!

* subversion/libsvn_wc/adm_ops.c
  (process_committed_internal): don't process files scheduled to be deleted
   in a replaced directory.

* subversion/tests/cmdline/merge_tests.py
  (test_list): merge_dir_replace is passing now
]]]

Index: subversion/libsvn_wc/adm_ops.c
===================================================================
--- subversion/libsvn_wc/adm_ops.c (revision 22935)
+++ subversion/libsvn_wc/adm_ops.c (working copy)
@@ -538,10 +538,28 @@
                      new_revnum, rev_date, rev_author, NULL, FALSE,
                      remove_changelist, NULL, subpool));
           else
- SVN_ERR(process_committed_leaf
- ((*log_number)++, this_path, adm_access, NULL,
- new_revnum, rev_date, rev_author, NULL, FALSE,
- remove_changelist, NULL, subpool));
+ {
+ /* No log file is executed at this time. In case this folder
+ gets replaced, the entries file might still contain files
+ scheduled for deletion. No need to process those here, they
+ will be when the parent is processed. */
+ if (current_entry->schedule == svn_wc_schedule_delete)
+ {
+ svn_wc_entry_t *parent_entry;
+ apr_hash_t *entries;
+ SVN_ERR(svn_wc_entries_read(&entries, adm_access, FALSE,
+ subpool));
+
+ parent_entry = apr_hash_get(entries, SVN_WC_ENTRY_THIS_DIR,
+ APR_HASH_KEY_STRING);
+ if (parent_entry->schedule == svn_wc_schedule_replace)
+ continue;
+ }
+ SVN_ERR(process_committed_leaf
+ ((*log_number)++, this_path, adm_access, NULL,
+ new_revnum, rev_date, rev_author, NULL, FALSE,
+ remove_changelist, NULL, subpool));
+ }
         }
 
       svn_pool_destroy(subpool);
Index: subversion/tests/cmdline/merge_tests.py
===================================================================
--- subversion/tests/cmdline/merge_tests.py (revision 22935)
+++ subversion/tests/cmdline/merge_tests.py (working copy)
@@ -4012,7 +4012,7 @@
               property_merge_undo_redo,
               cherry_pick_text_conflict,
               merge_file_replace,
- XFail(merge_dir_replace),
+ merge_dir_replace,
               XFail(merge_dir_and_file_replace),
               merge_file_replace_to_mixed_rev_wc,
               merge_added_dir_to_deleted_in_target,

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Jan 8 23:40:21 2007

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.