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

Re: svn commit: r16230 - in branches/wc-replacements/subversion: tests/clients/cmdline

From: Erik Huelsmann <ehuels_at_gmail.com>
Date: 2005-09-25 18:25:26 CEST

Hi Ivan!

On 9/23/05, zhakov@tigris.org <zhakov@tigris.org> wrote:
> Author: zhakov
> Date: Fri Sep 23 11:19:17 2005
> New Revision: 16230
>
> Modified:
> branches/wc-replacements/subversion/libsvn_wc/entries.c
> branches/wc-replacements/subversion/tests/clients/cmdline/copy_tests.py
>
> Log:
> 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
(http://subversion.tigris.org/servlets/ReadMsg?list=dev&msgNo=105631).
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.

bye,

Erik.

The patch (which changes svn_wc__entry_modify()):

Index: subversion/libsvn_wc/entries.c
===================================================================
--- 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 |
+ SVN_WC__ENTRY_MODIFY_COPIED;
+
+ 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

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