sapling/eden/scm/tests/test-journal-exists.t
Durham Goode f188acb4e0 recover: don't verify the repo
Summary:
Verifying the changelog is quite slow and we've had more users needing
to run hg recover these days. Let's finally get rid of the verify step.

Reviewed By: simpkins

Differential Revision: D20109706

fbshipit-source-id: a512d9e11716514bce986b0e3a26347fe6afd955
2020-02-26 09:07:08 -08:00

39 lines
862 B
Perl

#chg-compatible
$ disable treemanifest
$ hg init
$ echo a > a
$ hg ci -Am0
adding a
$ hg -q clone . foo
$ touch .hg/store/journal
$ echo foo > a
$ hg ci -Am0
abort: abandoned transaction found!
(run 'hg recover' to clean up transaction)
[255]
$ hg recover
rolling back interrupted transaction
Check that zero-size journals are correctly aborted:
#if unix-permissions no-root
$ hg bundle -qa repo.hg
$ chmod -w foo/.hg/store/00changelog.i
$ hg -R foo unbundle repo.hg
adding changesets
abort: Permission denied: $TESTTMP/foo/.hg/store/.00changelog.i-* (glob)
(current process runs with uid 42)
($TESTTMP/foo/.hg/store/.00changelog.i*: mode 0o52, uid 42, gid 42) (glob)
($TESTTMP/foo/.hg/store: mode 0o52, uid 42, gid 42)
[255]
$ if test -f foo/.hg/store/journal; then echo 'journal exists :-('; fi
#endif