sapling/eden/scm/tests/test-journal-exists.t

39 lines
862 B
Perl
Raw Normal View History

#chg-compatible
$ disable treemanifest
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' to clean up transaction)
2010-09-17 02:51:32 +04:00
[255]
2010-09-10 21:05:49 +04:00
$ hg recover
rolling back interrupted transaction
Check that zero-size journals are correctly aborted:
#if unix-permissions no-root
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)
(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)
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