Mercurial > hg
annotate tests/test-journal-exists.t @ 25190:22438cfd11b5
phases: add set per phase in C phase computation
To speed up the computation of draft(), secret(), divergent(), obsolete() and
unstable() we need to have a fast way of getting the list of revisions that
are in draft(), secret() or the union of both: not public().
This patch extends the work on phase computation in C and make the phase
computation code also return a list of set for each non public phase.
Using these sets we can quickly obtain all the revisions of a given phase.
We do not return a set for the public phase as we expect it to be roughly the
size of the repo. Also, it can be computed easily by substracting the entries in the
non public phases from all the revs in the repo.
author | Laurent Charignon <lcharignon@fb.com> |
---|---|
date | Wed, 01 Apr 2015 11:17:17 -0700 |
parents | 3b4c75690206 |
children | f1186c292d03 |
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 |
21274
3b4c75690206
journal: set Abort hint when failing due to an abandoned transaction
Johan Bjork <jbjoerk@gmail.com>
parents:
20008
diff
changeset
|
12 abort: abandoned transaction found! |
3b4c75690206
journal: set Abort hint when failing due to an abandoned transaction
Johan Bjork <jbjoerk@gmail.com>
parents:
20008
diff
changeset
|
13 (run 'hg recover' to clean up transaction) |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12205
diff
changeset
|
14 [255] |
5865
e7127f669edb
transactions: don't show a backtrace when journal exists
Matt Mackall <mpm@selenic.com>
parents:
diff
changeset
|
15 |
12205
b4d0d646b3f7
tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents:
9693
diff
changeset
|
16 $ hg recover |
b4d0d646b3f7
tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents:
9693
diff
changeset
|
17 rolling back interrupted transaction |
b4d0d646b3f7
tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents:
9693
diff
changeset
|
18 checking changesets |
b4d0d646b3f7
tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents:
9693
diff
changeset
|
19 checking manifests |
b4d0d646b3f7
tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents:
9693
diff
changeset
|
20 crosschecking files in changesets and manifests |
b4d0d646b3f7
tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents:
9693
diff
changeset
|
21 checking files |
b4d0d646b3f7
tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents:
9693
diff
changeset
|
22 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
|
23 |
12205
b4d0d646b3f7
tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents:
9693
diff
changeset
|
24 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
|
25 |
20008
e54a078153f7
tests: skip tests that require not having root (issue4089)
Matt Mackall <mpm@selenic.com>
parents:
16959
diff
changeset
|
26 #if unix-permissions no-root |
12205
b4d0d646b3f7
tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents:
9693
diff
changeset
|
27 $ hg bundle -qa repo.hg |
b4d0d646b3f7
tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents:
9693
diff
changeset
|
28 $ chmod -w foo/.hg/store/00changelog.i |
b4d0d646b3f7
tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents:
9693
diff
changeset
|
29 |
b4d0d646b3f7
tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents:
9693
diff
changeset
|
30 $ hg -R foo unbundle repo.hg |
b4d0d646b3f7
tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents:
9693
diff
changeset
|
31 adding changesets |
12640
6cc4b14fb76b
tests: remove redundant globs
Mads Kiilerich <mads@kiilerich.com>
parents:
12376
diff
changeset
|
32 abort: Permission denied: $TESTTMP/foo/.hg/store/.00changelog.i-* (glob) |
12316
4134686b83e1
tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents:
12205
diff
changeset
|
33 [255] |
12205
b4d0d646b3f7
tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents:
9693
diff
changeset
|
34 |
b4d0d646b3f7
tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents:
9693
diff
changeset
|
35 $ if test -f foo/.hg/store/journal; then echo 'journal exists :-('; fi |
16959
acba1281e064
test-journal-exists: use #if
Adrian Buehlmann <adrian@cadifra.com>
parents:
15443
diff
changeset
|
36 #endif |
12205
b4d0d646b3f7
tests: unify test-journal-exists
Adrian Buehlmann <adrian@cadifra.com>
parents:
9693
diff
changeset
|
37 |