##// END OF EJS Templates
tests: unify test-journal-exists
Adrian Buehlmann -
r12205:b4d0d646 default
parent child Browse files
Show More
@@ -1,20 +1,34 b''
1 #!/bin/sh
1 $ hg init
2 $ echo a > a
3 $ hg ci -Am0
4 adding a
2 5
3 hg init
4 echo a > a
5 hg ci -Am0
6 hg -q clone . foo
6 $ hg -q clone . foo
7
8 $ touch .hg/store/journal
7 9
8 touch .hg/store/journal
10 $ echo foo > a
11 $ hg ci -Am0
12 abort: abandoned transaction found - run hg recover!
9 13
10 echo foo > a
11 hg ci -Am0
14 $ hg recover
15 rolling back interrupted transaction
16 checking changesets
17 checking manifests
18 crosschecking files in changesets and manifests
19 checking files
20 1 files, 1 changesets, 1 total revisions
12 21
13 hg recover
22 Check that zero-size journals are correctly aborted:
14 23
15 echo % check that zero-size journals are correctly aborted
16 hg bundle -qa repo.hg
17 chmod -w foo/.hg/store/00changelog.i
18 hg -R foo unbundle repo.hg 2>&1 | sed 's/\(abort: Permission denied\).*/\1/'
19 if test -f foo/.hg/store/journal; then echo 'journal exists :-('; fi
20 exit 0
24 $ hg bundle -qa repo.hg
25 $ chmod -w foo/.hg/store/00changelog.i
26
27 $ hg -R foo unbundle repo.hg
28 adding changesets
29 abort: Permission denied: .*
30
31 $ if test -f foo/.hg/store/journal; then echo 'journal exists :-('; fi
32
33 $ exit 0
34
1 NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now