Mercurial > hg
annotate tests/test-repo-compengines.t @ 31971:73e9328e5307
obsolescence: add test case D-3 for obsolescence markers exchange
About 3 years ago, in August 2014, the logic to select what markers to select on
push was ported from the evolve extension to Mercurial core. However, for some
unclear reasons, the tests for that logic were not ported alongside.
I realised it a couple of weeks ago while working on another push related issue.
I've made a clean up pass on the tests and they are now ready to integrate the
core test suite. This series of changesets do not change any logic. I just adds
test for logic that has been around for about 10 versions of Mercurial.
They are a patch for each test case. It makes it easier to review and postpone
one with documentation issues without rejecting the wholes series.
This patch introduce case D3: missing prune target (prune not in "pushed set")
Each test case comes it in own test file. It help parallelism and does not
introduce a significant overhead from having a single unified giant test file.
Here are timing to support this claim.
# Multiple test files version:
# run-tests.py --local -j 1 test-exchange-*.t
53.40s user 6.82s system 85% cpu 1:10.76 total
52.79s user 6.97s system 85% cpu 1:09.97 total
52.94s user 6.82s system 85% cpu 1:09.69 total
# Single test file version:
# run-tests.py --local -j 1 test-exchange-obsmarkers.t
52.97s user 6.85s system 85% cpu 1:10.10 total
52.64s user 6.79s system 85% cpu 1:09.63 total
53.70s user 7.00s system 85% cpu 1:11.17 total
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Mon, 10 Apr 2017 16:54:43 +0200 |
parents | 4c0a5a256ae8 |
children | c2c8962a9465 |
rev | line source |
---|---|
30818
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1 A new repository uses zlib storage, which doesn't need a requirement |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
2 |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
3 $ hg init default |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
4 $ cd default |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
5 $ cat .hg/requires |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
6 dotencode |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
7 fncache |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
8 generaldelta |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
9 revlogv1 |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
10 store |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
11 |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
12 $ touch foo |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
13 $ hg -q commit -A -m 'initial commit with a lot of repeated repeated repeated text to trigger compression' |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
14 $ hg debugrevlog -c | grep 0x78 |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
15 0x78 (x) : 1 (100.00%) |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
16 0x78 (x) : 110 (100.00%) |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
17 |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
18 $ cd .. |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
19 |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
20 Unknown compression engine to format.compression aborts |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
21 |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
22 $ hg --config experimental.format.compression=unknown init unknown |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
23 abort: compression engine unknown defined by experimental.format.compression not available |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
24 (run "hg debuginstall" to list available compression engines) |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
25 [255] |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
26 |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
27 A requirement specifying an unknown compression engine results in bail |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
28 |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
29 $ hg init unknownrequirement |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
30 $ cd unknownrequirement |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
31 $ echo exp-compression-unknown >> .hg/requires |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
32 $ hg log |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
33 abort: repository requires features unknown to this Mercurial: exp-compression-unknown! |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
34 (see https://mercurial-scm.org/wiki/MissingRequirement for more information) |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
35 [255] |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
36 |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
37 $ cd .. |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
38 |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
39 #if zstd |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
40 |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
41 $ hg --config experimental.format.compression=zstd init zstd |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
42 $ cd zstd |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
43 $ cat .hg/requires |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
44 dotencode |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
45 exp-compression-zstd |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
46 fncache |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
47 generaldelta |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
48 revlogv1 |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
49 store |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
50 |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
51 $ touch foo |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
52 $ hg -q commit -A -m 'initial commit with a lot of repeated repeated repeated text' |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
53 |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
54 $ hg debugrevlog -c | grep 0x28 |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
55 0x28 : 1 (100.00%) |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
56 0x28 : 98 (100.00%) |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
57 |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
58 $ cd .. |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
59 |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
60 Specifying a new format.compression on an existing repo won't introduce data |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
61 with that engine or a requirement |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
62 |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
63 $ cd default |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
64 $ touch bar |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
65 $ hg --config experimental.format.compression=zstd -q commit -A -m 'add bar with a lot of repeated repeated repeated text' |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
66 |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
67 $ cat .hg/requires |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
68 dotencode |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
69 fncache |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
70 generaldelta |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
71 revlogv1 |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
72 store |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
73 |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
74 $ hg debugrevlog -c | grep 0x78 |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
75 0x78 (x) : 2 (100.00%) |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
76 0x78 (x) : 199 (100.00%) |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
77 |
4c0a5a256ae8
localrepo: experimental support for non-zlib revlog compression
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
78 #endif |