annotate tests/test-journal-exists.t @ 12375:02990e22150b

tests: require regexes in unified tests to be marked with " (re)" Consider this test: $ hg glog --template '{rev}:{node|short} "{desc}"\n' @ 2:20c4f79fd7ac "3" | | o 1:38f24201dcab "2" |/ o 0:2a18120dc1c9 "1" Because each line beginning with "|" can be compiled as a regular expression (equivalent to ".*|"), they will match any output. Similarly: $ echo foo The blank output line can be compiled as a regular expression and will also match any output. With this patch, none of the above output lines will be matched as regular expressions. A line must end in " (re)" in order to be matched as one. Lines are still matched literally first, so the following will pass: $ echo 'foo (re)' foo (re)
author Brodie Rao <brodie@bitheap.org>
date Wed, 22 Sep 2010 16:06:00 -0500
parents 92e30e135581
children 97ffc68f71d3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12205
b4d0d646b3f7 tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents: 9693
diff changeset
1 $ hg init
b4d0d646b3f7 tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents: 9693
diff changeset
2 $ echo a > a
b4d0d646b3f7 tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents: 9693
diff changeset
3 $ hg ci -Am0
b4d0d646b3f7 tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents: 9693
diff changeset
4 adding a
5865
e7127f669edb transactions: don't show a backtrace when journal exists
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
5
12205
b4d0d646b3f7 tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents: 9693
diff changeset
6 $ hg -q clone . foo
b4d0d646b3f7 tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents: 9693
diff changeset
7
b4d0d646b3f7 tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents: 9693
diff changeset
8 $ touch .hg/store/journal
5865
e7127f669edb transactions: don't show a backtrace when journal exists
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
9
12205
b4d0d646b3f7 tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents: 9693
diff changeset
10 $ echo foo > a
b4d0d646b3f7 tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents: 9693
diff changeset
11 $ hg ci -Am0
b4d0d646b3f7 tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents: 9693
diff changeset
12 abort: abandoned transaction found - run hg recover!
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12205
diff changeset
13 [255]
5865
e7127f669edb transactions: don't show a backtrace when journal exists
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
14
12205
b4d0d646b3f7 tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents: 9693
diff changeset
15 $ hg recover
b4d0d646b3f7 tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents: 9693
diff changeset
16 rolling back interrupted transaction
b4d0d646b3f7 tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents: 9693
diff changeset
17 checking changesets
b4d0d646b3f7 tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents: 9693
diff changeset
18 checking manifests
b4d0d646b3f7 tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents: 9693
diff changeset
19 crosschecking files in changesets and manifests
b4d0d646b3f7 tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents: 9693
diff changeset
20 checking files
b4d0d646b3f7 tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents: 9693
diff changeset
21 1 files, 1 changesets, 1 total revisions
5865
e7127f669edb transactions: don't show a backtrace when journal exists
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
22
12205
b4d0d646b3f7 tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents: 9693
diff changeset
23 Check that zero-size journals are correctly aborted:
9693
c40a1ee20aa5 transaction: always remove empty journal on abort
Sune Foldager <cryo@cyanite.org>
parents: 5867
diff changeset
24
12205
b4d0d646b3f7 tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents: 9693
diff changeset
25 $ hg bundle -qa repo.hg
b4d0d646b3f7 tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents: 9693
diff changeset
26 $ chmod -w foo/.hg/store/00changelog.i
b4d0d646b3f7 tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents: 9693
diff changeset
27
b4d0d646b3f7 tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents: 9693
diff changeset
28 $ hg -R foo unbundle repo.hg
b4d0d646b3f7 tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents: 9693
diff changeset
29 adding changesets
12375
02990e22150b tests: require regexes in unified tests to be marked with " (re)"
Brodie Rao <brodie@bitheap.org>
parents: 12327
diff changeset
30 abort: Permission denied: .* (re)
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12205
diff changeset
31 [255]
12205
b4d0d646b3f7 tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents: 9693
diff changeset
32
b4d0d646b3f7 tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents: 9693
diff changeset
33 $ if test -f foo/.hg/store/journal; then echo 'journal exists :-('; fi
b4d0d646b3f7 tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents: 9693
diff changeset
34