mirror of
https://github.com/facebook/sapling.git
synced 2024-10-06 14:58:03 +03:00
ff66f7deed
Summary: Undo revlog corruption should not affect other commands. There were multiple user reports. This should not need a reclone. Reviewed By: markbt Differential Revision: D29723869 fbshipit-source-id: 8f48f45c1e25478ac9ff713fbcf69eaa08f464a8
42 lines
736 B
Perl
42 lines
736 B
Perl
#chg-compatible
|
|
|
|
$ configure modern
|
|
$ enable undo remotenames
|
|
$ setconfig hint.ack-hint-ack=1
|
|
|
|
$ newrepo
|
|
$ drawdag << 'EOS'
|
|
> B
|
|
> |
|
|
> A
|
|
> EOS
|
|
|
|
Break the undo log
|
|
|
|
$ cat > a.py << EOF
|
|
> import os
|
|
> with open('.hg/undolog/index.i', 'rb+') as f:
|
|
> f.seek(-10, os.SEEK_END)
|
|
> f.write(b"x")
|
|
> EOF
|
|
|
|
$ hg debugpython a.py
|
|
|
|
Command should not abort
|
|
|
|
$ hg debugdrawdag << 'EOS'
|
|
> C
|
|
> |
|
|
> desc(A)
|
|
> EOS
|
|
hint[undo-corrupt]: undo history is corrupted
|
|
(try deleting $TESTTMP/repo1/.hg/undolog to recover)
|
|
|
|
Undo itself does not crash
|
|
|
|
$ hg undo
|
|
cannot undo: undo history is corrupted
|
|
hint[undo-corrupt]: undo history is corrupted
|
|
(try deleting $TESTTMP/repo1/.hg/undolog to recover)
|
|
|