Fossil SCM
Fossil leaves files in inconsistent state after error
a9722a15d235b82…
· opened 16 years, 2 months ago
- Type
- Code_Defect
- Priority
- —
- Severity
- Severe
- Resolution
- Fixed
- Subsystem
- —
- Created
- Jan. 13, 2010 2:39 p.m.
OP: Windows
performing a fossil update
One file cannot be written (in our case, one DLL that was being used by an open program). Fossil gives an error and stops.
The situation is the following:
The name of the checkout version (given by fossil info) is the one previous to the update. All the files that had been updated prior to the error, become labelled as "EDITED".
The situation is not easy to fix:
"fossil update" does nothing "fossil checkout --latest --force" will miss all the legitimate changes made to the files
Possible solutions:
1 Something similar to "rollback". If it fails, keep a copy of the existing files and replace them
2 Do the update of all files to files "myfile.c.tempfossil" and rename all files after successful operation
3 If the update has been partially made, change the "fossil info" checkout version number
drh added on 2010-01-13 16:02:04:
Did you try running:
fossil undo
Did that not revert the files to their state before the update?
anonymous claiming to be ramsan added on 2010-01-13 22:36:30:
No. I have not tried.
But shouldn't fossil do an automatic undo in case of error?
anonymous claiming to be ramsan added on 2010-01-14 11:14:02:
I have made a similar test in unix. Before the update, I've made:
chmod -w file.c fossil update
The update gives an error, "fossil info" points to the old version, and some of the files become marked as "EDITED"
fossil undo
does not work and responds:
fossil: no update or merge operation is available to undo
drh added on 2010-01-14 15:35:44:
Fixed by check-in [7c3cb28d0f76c038ae4cc17a65311564b4d90408]