Last week I mentioned a bug where Fossil doesn't properly revert renamed
files. In rather quick fashion, Richard committed a fix that resolved some
of the problems associated with this. However, when I got a chance to do
some more testing I found that some issues remained. Instead of badgering
Richard or someone else to spend more time on this, I've come up with a
patch [1] that should fix all the issues I've found. I've also written a
far-from-comprehensive test file [2] that does some Fossil- and
file-system-based verifications on the results of 'fossil revert'. The
latest check-in to trunk fails four of the seven tests (the ones where a
renamed file is reverted).

To clarify exactly what this patch aims to accomplish, this is what I
believe to be the correct behavior for reverting renamed files:

Calling 'fossil revert' with either the original filename or the renamed
filename as arguments (or with no filename arguments) should have the same
result: the original file should be restored and the renamed file should be
removed. Subsequently calling 'fossil changes' and 'fossil addremove
--test' should show no entries related to either of the files involved in
the reverted rename.

I've got a CLA in the mail in case this code can be of use. If there are
any changes I need to make in order to get it incorporated into trunk, just
let me know. Thanks!

[1] http://www.joelface.com/fossil/revert-renames-fix.patch
[2] http://www.joelface.com/fossil/revert.test
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to