You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Erik Huelsmann <eh...@gmail.com> on 2005/09/25 16:25:26 UTC
Re: svn commit: r16230 - in branches/wc-replacements/subversion: tests/clients/cmdline
Hi Ivan!
On 9/23/05, zhakov@tigris.org <zh...@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);
Re: svn commit: r16230 - in branches/wc-replacements/subversion:
tests/clients/cmdline
Posted by Philip Martin <ph...@codematters.co.uk>.
Ivan Zhakov <ch...@gmail.com> writes:
> Little refinement: Philip Martin said that fold_scheduling is odd for
> him, not fold_entry./
Yes, fold_entry looks good.
--
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn commit: r16230 - in branches/wc-replacements/subversion: tests/clients/cmdline
Posted by Ivan Zhakov <ch...@gmail.com>.
On 9/25/05, Erik Huelsmann <eh...@gmail.com> wrote:
> Hi Ivan!
>
> On 9/23/05, zhakov@tigris.org <zh...@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).
Little refinement: Philip Martin said that fold_scheduling is odd for
him, not fold_entry./
> 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.
My arguments that change in fold_entry more simpler and doesn't
depends what is modified in entry.
--
Ivan Zhakov