annotate tests/test-journal-exists.t @ 40417:49c7b701fdc2 stable

phase: add an archived phase This phase allows for hidden changesets in the "user space". It differs from the "internal" phase which is intended for internal by-product only. There have been discussions at the 4.8 sprint to use such phase to speedup cleanup after history rewriting operation. Shipping it in the same release as the 'internal-phase' groups the associated `requires` entry. The important bit is to have support for this phase in the earliest version of mercurial possible. Adding the UI to manipulate this new phase later seems fine. The current plan for archived usage and user interface are as follow. On a repository with internal-phase on and evolution off: * history rewriting command set rewritten changeset in the archived phase. (This mean updating the cleanupnodes method). * keep `hg unbundle .hg/strip-backup/X.hg` as a way to restore changeset for now (backup bundle need to contains phase data) * [maybe] add a `hg strip --soft` advance flag (a light way to expose the feature without getting in the way of a better UI) Mercurial 4.8 freeze is too close to get the above in by then. We don't introduce a new repository `requirement` as we reuse the one introduced with the 'archived' phase during the 4.8 cycle.
author Boris Feld <boris.feld@octobus.net>
date Wed, 17 Oct 2018 14:47:01 +0200
parents f1186c292d03
children b6673e9bdcf6
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
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
39489
f1186c292d03 verify: make output less confusing (issue5924)
Meirambek Omyrzak <meirambek77@gmail.com>
parents: 21274
diff changeset
22 checked 1 changesets with 1 changes to 1 files
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