Great! Thanks for tracking this down & writing a patch.
It's issue #548 now, the first part of which is simply to review and
apply the patch.
If I understand it correctly, your patch will fix the revert bug, but
not the first bug you described in your first mail (the one where a
backdated file doesn't get updated correctly). That one will require
some thoughtful investigation, perhaps discussion as well -- a
backdated file may possibly be a case where we want functionality like
CVS's sticky tags; but not necessarily, as one could have updated the
dir just to get a prop change.
Anyway, both are recorded in that issue for now.
Watch this space for more. :-)
-K
Philip Martin <pmartin@uklinux.net> writes:
> Philip Martin <pmartin@uklinux.net> writes:
>
> > Second, in this situation (file out-of-date in up-to-date directory)
> > the working copy can be corrupted as follows:
>
> This bug occurs in an up-to-date working copy as well.
>
> >
> > $ svn del bar.c
> > D bar.c
> > $ svn add bar.c
> > A bar.c
> > $ svn revert bar.c
> > Reverted bar.c
> > $ svn st -uv
> >
> > svn_error: #21049 : <Filesystem has no such file>
> > file not found: filesystem `/home/pm/sw/subversion/repository/trial/db', revision `0', path `bar.c'
>
> The problem is that the revert command does not remove the
> revision="0" line from the .svn/entries file. It looks like
> fold_entry() should do this but modify_flags does not contain
> SVN_WC__ENTRY_MODIFY_REVISION. It looks like revert_admin_things()
> should be setting it, how about:
>
> * subversion/libsvn_wc/adm_ops: revert_admin_things(): restore the
> revision when reverting a replaced file.
>
> Index: subversion/libsvn_wc/adm_ops.c
> ===================================================================
> --- subversion/libsvn_wc/.svn/text-base/adm_ops.c Sat Nov 3 17:29:27 2001
> +++ subversion/libsvn_wc/adm_ops.c Mon Nov 5 15:24:30 2001
> @@ -825,6 +825,10 @@
> *modify_flags |= SVN_WC__ENTRY_MODIFY_TEXT_TIME;
> entry->text_time = tstamp;
> }
> +
> + /* Restore the revison if reverting a replaced file. */
> + if (entry->schedule == svn_wc_schedule_replace)
> + *modify_flags |= SVN_WC__ENTRY_MODIFY_REVISION;
> }
>
> if (entry->conflicted)
>
>
> Philip
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:48 2006