sapling/tests/test-journal-exists.t

37 lines
769 B
Perl
Raw Normal View History

2010-09-10 21:05:49 +04:00
$ 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!
2010-09-17 02:51:32 +04:00
[255]
2010-09-10 21:05:49 +04:00
$ hg recover
rolling back interrupted transaction
checking changesets
checking manifests
crosschecking files in changesets and manifests
checking files
1 files, 1 changesets, 1 total revisions
Check that zero-size journals are correctly aborted:
2012-06-15 02:39:21 +04:00
#if unix-permissions
2010-09-10 21:05:49 +04:00
$ 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)
2010-09-17 02:51:32 +04:00
[255]
2010-09-10 21:05:49 +04:00
$ if test -f foo/.hg/store/journal; then echo 'journal exists :-('; fi
2012-06-15 02:39:21 +04:00
#endif
2010-09-10 21:05:49 +04:00