Skip to content
Snippets Groups Projects
Commit 486b8a38 authored by Pierre-Yves David's avatar Pierre-Yves David :octopus:
Browse files

dirstate-v2: display a possible issue with transaction

If we backup the dirstate without the data file, we can end up in an
inconsistent state of the transaction is rolled back.
parent 6b4ad07b
No related branches found
No related tags found
2 merge requests!229branching: merge stable into default,!226fix dirstate-v2 + transaction issue
......@@ -213,3 +213,41 @@
#endif
Transaction compatibility
-------------------------
The transaction preserves the dirstate.
We should make sure all of it (docket + data) is preserved
#if dirstate-v2
$ hg commit -m 'bli'
#endif
$ hg update --quiet
$ hg revert --all --quiet
$ rm -f a
$ echo foo > foo
$ hg add foo
$ hg commit -m foo
#if dirstate-v2
$ uid=$(find_dirstate_uuid)
$ touch bar
$ while [ uid = $(find_dirstate_uuid) ]; do
> hg add bar;
> hg remove bar;
> done;
$ rm bar
#endif
$ hg rollback
repository tip rolled back to revision 1 (undo commit)
working directory now based on revision 1
#if dirstate-v1
$ hg status
A foo
#else
$ hg status
abort: $ENOENT$: '*/.hg/dirstate.*' (glob) (known-bad-output !)
[255]
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment