On 9/23/05, firstname.lastname@example.org <email@example.com> wrote:
> Author: zhakov
> Date: Fri Sep 23 11:19:17 2005
> New Revision: 16230
> Cleanup meaningless entry fields combinations when it gets modified.
> This fixes deletion of replaced files.
> * subversion/libsvn_wc/entries.c
> (fold_entry): Cleanup meaningless fields combination.
> * subversion/tests/clients/cmdline/copy_tests.py:
> (test_list): Remove XFail mark from delete_replaced_file test,
> because change fixes it.
We talked about this change last friday on IRC. You asked on dev@ in
which routine to do the cleanup. Philip Martin responded that
fold_entry was an odd place to him
I was also working on a change (inlined below), because I wanted to
write the followup change to svn_wc_delete2().
I asked Karl (in irc too) which change he preferred, but had to leave
for the rest of the weekend, so we didn't come to a conclusion.
Can anybody come up with arguments why one change or the other is
better? From what Philip writes, I conclude he feels
svn_wc__entry_modify is the better place to do the change. I'm
looking for arguments rather than feelings though.
Hope someone can help.
The patch (which changes svn_wc__entry_modify()):
--- subversion/libsvn_wc/entries.c (revision 16212)
+++ subversion/libsvn_wc/entries.c (working copy)
@@ -1690,9 +1690,25 @@
if (modify_flags & SVN_WC__ENTRY_MODIFY_SCHEDULE)
svn_wc_entry_t *entry_before, *entry_after;
- apr_uint32_t orig_modify_flags = modify_flags;
+ apr_uint32_t orig_modify_flags;
svn_wc_schedule_t orig_schedule = entry->schedule;
+ /* Make sure to invalidate fields not related to the new schedule */
+ if (!(entry->schedule == svn_wc_schedule_add ||
+ entry->schedule == svn_wc_schedule_replace))
+ modify_flags |=
+ SVN_WC__ENTRY_MODIFY_COPYFROM_URL |
+ SVN_WC__ENTRY_MODIFY_COPYFROM_REV |
+ entry->copyfrom_url = NULL;
+ entry->copyfrom_rev = SVN_INVALID_REVNUM;
+ entry->copied = FALSE;
+ orig_modify_flags = modify_flags;
/* Keep a copy of the unmodified entry on hand. */
entry_before = apr_hash_get (entries, name, APR_HASH_KEY_STRING);
Received on Sun Sep 25 18:26:13 2005