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
Received on Sat Oct 21 14:36:48 2006