Mercurial > hg
annotate tests/test-persistent-nodemap.t @ 44780:f727939f3513 stable
tests: use regular POSIX shell
wait-on-file requires one POSIX extension (sleep with non-integral
argument), but it doesn't require any bash extensions, so just require a
normal POSIX shell. While here, use consistent formatting without
redundant ;
Differential Revision: https://phab.mercurial-scm.org/D8500
author | Joerg Sonnenberger <joerg@bec.de> |
---|---|
date | Thu, 07 May 2020 15:00:33 +0200 |
parents | c70bcaf7927b |
children | 2c073d82fbfa affe0fb42250 |
rev | line source |
---|---|
44307
c577bb4a04d4
nodemap: have some python code writing a nodemap in persistent binary form
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
1 =================================== |
c577bb4a04d4
nodemap: have some python code writing a nodemap in persistent binary form
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
2 Test the persistent on-disk nodemap |
c577bb4a04d4
nodemap: have some python code writing a nodemap in persistent binary form
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
3 =================================== |
c577bb4a04d4
nodemap: have some python code writing a nodemap in persistent binary form
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
4 |
c577bb4a04d4
nodemap: have some python code writing a nodemap in persistent binary form
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
5 $ hg init test-repo |
c577bb4a04d4
nodemap: have some python code writing a nodemap in persistent binary form
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
6 $ cd test-repo |
44308
5962fd0d1045
nodemap: write nodemap data on disk
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44307
diff
changeset
|
7 $ cat << EOF >> .hg/hgrc |
5962fd0d1045
nodemap: write nodemap data on disk
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44307
diff
changeset
|
8 > [experimental] |
5962fd0d1045
nodemap: write nodemap data on disk
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44307
diff
changeset
|
9 > exp-persistent-nodemap=yes |
44313
6f9e8e142cea
nodemap: add a (python) index class for persistent nodemap testing
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44312
diff
changeset
|
10 > [devel] |
6f9e8e142cea
nodemap: add a (python) index class for persistent nodemap testing
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44312
diff
changeset
|
11 > persistent-nodemap=yes |
44308
5962fd0d1045
nodemap: write nodemap data on disk
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44307
diff
changeset
|
12 > EOF |
44307
c577bb4a04d4
nodemap: have some python code writing a nodemap in persistent binary form
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
13 $ hg debugbuilddag .+5000 |
44334
6614b301ea58
nodemap: add a flag to dump the details of the docket
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44333
diff
changeset
|
14 $ hg debugnodemap --metadata |
6614b301ea58
nodemap: add a flag to dump the details of the docket
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44333
diff
changeset
|
15 uid: ???????????????? (glob) |
44335
e41a164db7a9
nodemap: track the maximum revision tracked in the nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44334
diff
changeset
|
16 tip-rev: 5000 |
44515
6c906eaedd0d
nodemap: track the tip_node for validation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44513
diff
changeset
|
17 tip-node: 06ddac466af534d365326c13c3879f97caca3cb1 |
44336
8374b69aef75
nodemap: track the total and unused amount of data in the rawdata file
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44335
diff
changeset
|
18 data-length: 122880 |
8374b69aef75
nodemap: track the total and unused amount of data in the rawdata file
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44335
diff
changeset
|
19 data-unused: 0 |
44635
99ea74cbed74
nodemap: display percentage of unused in `hg debugnodemap`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44634
diff
changeset
|
20 data-unused: 0.000% |
44311
2b72c4ff8ed1
nodemap: use an intermediate "docket" file to carry small metadata
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44309
diff
changeset
|
21 $ f --size .hg/store/00changelog.n |
44515
6c906eaedd0d
nodemap: track the tip_node for validation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44513
diff
changeset
|
22 .hg/store/00changelog.n: size=70 |
44464
23df5ecfa365
nodemap: check that a simple lookup works fine
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44445
diff
changeset
|
23 |
23df5ecfa365
nodemap: check that a simple lookup works fine
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44445
diff
changeset
|
24 Simple lookup works |
23df5ecfa365
nodemap: check that a simple lookup works fine
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44445
diff
changeset
|
25 |
23df5ecfa365
nodemap: check that a simple lookup works fine
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44445
diff
changeset
|
26 $ ANYNODE=`hg log --template '{node|short}\n' --rev tip` |
23df5ecfa365
nodemap: check that a simple lookup works fine
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44445
diff
changeset
|
27 $ hg log -r "$ANYNODE" --template '{rev}\n' |
23df5ecfa365
nodemap: check that a simple lookup works fine
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44445
diff
changeset
|
28 5000 |
23df5ecfa365
nodemap: check that a simple lookup works fine
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44445
diff
changeset
|
29 |
44513
e7fff9c3cdac
rust-nodemap: automatically use the rust index for persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44495
diff
changeset
|
30 |
e7fff9c3cdac
rust-nodemap: automatically use the rust index for persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44495
diff
changeset
|
31 #if rust |
e7fff9c3cdac
rust-nodemap: automatically use the rust index for persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44495
diff
changeset
|
32 |
e7fff9c3cdac
rust-nodemap: automatically use the rust index for persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44495
diff
changeset
|
33 $ f --sha256 .hg/store/00changelog-*.nd |
e7fff9c3cdac
rust-nodemap: automatically use the rust index for persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44495
diff
changeset
|
34 .hg/store/00changelog-????????????????.nd: sha256=1e38e9ffaa45cad13f15c1a9880ad606f4241e8beea2f61b4d5365abadfb55f6 (glob) |
e7fff9c3cdac
rust-nodemap: automatically use the rust index for persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44495
diff
changeset
|
35 $ hg debugnodemap --dump-new | f --sha256 --size |
e7fff9c3cdac
rust-nodemap: automatically use the rust index for persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44495
diff
changeset
|
36 size=122880, sha256=1e38e9ffaa45cad13f15c1a9880ad606f4241e8beea2f61b4d5365abadfb55f6 |
e7fff9c3cdac
rust-nodemap: automatically use the rust index for persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44495
diff
changeset
|
37 $ hg debugnodemap --dump-disk | f --sha256 --bytes=256 --hexdump --size |
e7fff9c3cdac
rust-nodemap: automatically use the rust index for persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44495
diff
changeset
|
38 size=122880, sha256=1e38e9ffaa45cad13f15c1a9880ad606f4241e8beea2f61b4d5365abadfb55f6 |
e7fff9c3cdac
rust-nodemap: automatically use the rust index for persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44495
diff
changeset
|
39 0000: 00 00 00 76 00 00 01 65 00 00 00 95 00 00 01 34 |...v...e.......4| |
e7fff9c3cdac
rust-nodemap: automatically use the rust index for persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44495
diff
changeset
|
40 0010: 00 00 00 19 00 00 01 69 00 00 00 ab 00 00 00 4b |.......i.......K| |
e7fff9c3cdac
rust-nodemap: automatically use the rust index for persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44495
diff
changeset
|
41 0020: 00 00 00 07 00 00 01 4c 00 00 00 f8 00 00 00 8f |.......L........| |
e7fff9c3cdac
rust-nodemap: automatically use the rust index for persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44495
diff
changeset
|
42 0030: 00 00 00 c0 00 00 00 a7 00 00 00 89 00 00 01 46 |...............F| |
e7fff9c3cdac
rust-nodemap: automatically use the rust index for persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44495
diff
changeset
|
43 0040: 00 00 00 92 00 00 01 bc 00 00 00 71 00 00 00 ac |...........q....| |
e7fff9c3cdac
rust-nodemap: automatically use the rust index for persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44495
diff
changeset
|
44 0050: 00 00 00 af 00 00 00 b4 00 00 00 34 00 00 01 ca |...........4....| |
e7fff9c3cdac
rust-nodemap: automatically use the rust index for persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44495
diff
changeset
|
45 0060: 00 00 00 23 00 00 01 45 00 00 00 2d 00 00 00 b2 |...#...E...-....| |
e7fff9c3cdac
rust-nodemap: automatically use the rust index for persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44495
diff
changeset
|
46 0070: 00 00 00 56 00 00 01 0f 00 00 00 4e 00 00 02 4c |...V.......N...L| |
e7fff9c3cdac
rust-nodemap: automatically use the rust index for persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44495
diff
changeset
|
47 0080: 00 00 00 e7 00 00 00 cd 00 00 01 5b 00 00 00 78 |...........[...x| |
e7fff9c3cdac
rust-nodemap: automatically use the rust index for persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44495
diff
changeset
|
48 0090: 00 00 00 e3 00 00 01 8e 00 00 00 4f 00 00 00 b1 |...........O....| |
e7fff9c3cdac
rust-nodemap: automatically use the rust index for persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44495
diff
changeset
|
49 00a0: 00 00 00 30 00 00 00 11 00 00 00 25 00 00 00 d2 |...0.......%....| |
e7fff9c3cdac
rust-nodemap: automatically use the rust index for persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44495
diff
changeset
|
50 00b0: 00 00 00 ec 00 00 00 69 00 00 01 2b 00 00 01 2e |.......i...+....| |
e7fff9c3cdac
rust-nodemap: automatically use the rust index for persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44495
diff
changeset
|
51 00c0: 00 00 00 aa 00 00 00 15 00 00 00 3a 00 00 01 4e |...........:...N| |
e7fff9c3cdac
rust-nodemap: automatically use the rust index for persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44495
diff
changeset
|
52 00d0: 00 00 00 4d 00 00 00 9d 00 00 00 8e 00 00 00 a4 |...M............| |
e7fff9c3cdac
rust-nodemap: automatically use the rust index for persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44495
diff
changeset
|
53 00e0: 00 00 00 c3 00 00 00 eb 00 00 00 29 00 00 00 ad |...........)....| |
e7fff9c3cdac
rust-nodemap: automatically use the rust index for persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44495
diff
changeset
|
54 00f0: 00 00 01 3a 00 00 01 32 00 00 00 04 00 00 00 53 |...:...2.......S| |
e7fff9c3cdac
rust-nodemap: automatically use the rust index for persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44495
diff
changeset
|
55 |
e7fff9c3cdac
rust-nodemap: automatically use the rust index for persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44495
diff
changeset
|
56 |
e7fff9c3cdac
rust-nodemap: automatically use the rust index for persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44495
diff
changeset
|
57 #else |
e7fff9c3cdac
rust-nodemap: automatically use the rust index for persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44495
diff
changeset
|
58 |
44312
563dfdfd01a4
nodemap: delete older raw data file when creating a new ones
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44311
diff
changeset
|
59 $ f --sha256 .hg/store/00changelog-*.nd |
563dfdfd01a4
nodemap: delete older raw data file when creating a new ones
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44311
diff
changeset
|
60 .hg/store/00changelog-????????????????.nd: sha256=b961925120e1c9bc345c199b2cc442abc477029fdece37ef9d99cbe59c0558b7 (glob) |
44309
6c07480d6659
nodemap: add a function to read the data from disk
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44308
diff
changeset
|
61 $ hg debugnodemap --dump-new | f --sha256 --size |
44308
5962fd0d1045
nodemap: write nodemap data on disk
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44307
diff
changeset
|
62 size=122880, sha256=b961925120e1c9bc345c199b2cc442abc477029fdece37ef9d99cbe59c0558b7 |
44309
6c07480d6659
nodemap: add a function to read the data from disk
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44308
diff
changeset
|
63 $ hg debugnodemap --dump-disk | f --sha256 --bytes=256 --hexdump --size |
44307
c577bb4a04d4
nodemap: have some python code writing a nodemap in persistent binary form
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
64 size=122880, sha256=b961925120e1c9bc345c199b2cc442abc477029fdece37ef9d99cbe59c0558b7 |
c577bb4a04d4
nodemap: have some python code writing a nodemap in persistent binary form
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
65 0000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| |
c577bb4a04d4
nodemap: have some python code writing a nodemap in persistent binary form
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
66 0010: ff ff ff ff ff ff ff ff ff ff fa c2 ff ff ff ff |................| |
c577bb4a04d4
nodemap: have some python code writing a nodemap in persistent binary form
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
67 0020: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| |
c577bb4a04d4
nodemap: have some python code writing a nodemap in persistent binary form
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
68 0030: ff ff ff ff ff ff ed b3 ff ff ff ff ff ff ff ff |................| |
c577bb4a04d4
nodemap: have some python code writing a nodemap in persistent binary form
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
69 0040: ff ff ff ff ff ff ee 34 00 00 00 00 ff ff ff ff |.......4........| |
c577bb4a04d4
nodemap: have some python code writing a nodemap in persistent binary form
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
70 0050: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| |
c577bb4a04d4
nodemap: have some python code writing a nodemap in persistent binary form
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
71 0060: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| |
c577bb4a04d4
nodemap: have some python code writing a nodemap in persistent binary form
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
72 0070: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| |
c577bb4a04d4
nodemap: have some python code writing a nodemap in persistent binary form
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
73 0080: ff ff ff ff ff ff f8 50 ff ff ff ff ff ff ff ff |.......P........| |
c577bb4a04d4
nodemap: have some python code writing a nodemap in persistent binary form
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
74 0090: ff ff ff ff ff ff ff ff ff ff ec c7 ff ff ff ff |................| |
c577bb4a04d4
nodemap: have some python code writing a nodemap in persistent binary form
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
75 00a0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| |
c577bb4a04d4
nodemap: have some python code writing a nodemap in persistent binary form
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
76 00b0: ff ff ff ff ff ff fa be ff ff f2 fc ff ff ff ff |................| |
c577bb4a04d4
nodemap: have some python code writing a nodemap in persistent binary form
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
77 00c0: ff ff ff ff ff ff ef ea ff ff ff ff ff ff f9 17 |................| |
c577bb4a04d4
nodemap: have some python code writing a nodemap in persistent binary form
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
78 00d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| |
c577bb4a04d4
nodemap: have some python code writing a nodemap in persistent binary form
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
79 00e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| |
c577bb4a04d4
nodemap: have some python code writing a nodemap in persistent binary form
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
80 00f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| |
44513
e7fff9c3cdac
rust-nodemap: automatically use the rust index for persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44495
diff
changeset
|
81 |
e7fff9c3cdac
rust-nodemap: automatically use the rust index for persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44495
diff
changeset
|
82 #endif |
e7fff9c3cdac
rust-nodemap: automatically use the rust index for persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44495
diff
changeset
|
83 |
44318
20e125cdd719
nodemap: add basic checking of the on disk nodemap content
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44313
diff
changeset
|
84 $ hg debugnodemap --check |
20e125cdd719
nodemap: add basic checking of the on disk nodemap content
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44313
diff
changeset
|
85 revision in index: 5001 |
20e125cdd719
nodemap: add basic checking of the on disk nodemap content
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44313
diff
changeset
|
86 revision in nodemap: 5001 |
44312
563dfdfd01a4
nodemap: delete older raw data file when creating a new ones
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44311
diff
changeset
|
87 |
563dfdfd01a4
nodemap: delete older raw data file when creating a new ones
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44311
diff
changeset
|
88 add a new commit |
563dfdfd01a4
nodemap: delete older raw data file when creating a new ones
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44311
diff
changeset
|
89 |
563dfdfd01a4
nodemap: delete older raw data file when creating a new ones
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44311
diff
changeset
|
90 $ hg up |
563dfdfd01a4
nodemap: delete older raw data file when creating a new ones
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44311
diff
changeset
|
91 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
563dfdfd01a4
nodemap: delete older raw data file when creating a new ones
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44311
diff
changeset
|
92 $ echo foo > foo |
563dfdfd01a4
nodemap: delete older raw data file when creating a new ones
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44311
diff
changeset
|
93 $ hg add foo |
563dfdfd01a4
nodemap: delete older raw data file when creating a new ones
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44311
diff
changeset
|
94 $ hg ci -m 'foo' |
44336
8374b69aef75
nodemap: track the total and unused amount of data in the rawdata file
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44335
diff
changeset
|
95 |
44513
e7fff9c3cdac
rust-nodemap: automatically use the rust index for persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44495
diff
changeset
|
96 #if no-pure no-rust |
e7fff9c3cdac
rust-nodemap: automatically use the rust index for persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44495
diff
changeset
|
97 $ hg debugnodemap --metadata |
e7fff9c3cdac
rust-nodemap: automatically use the rust index for persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44495
diff
changeset
|
98 uid: ???????????????? (glob) |
e7fff9c3cdac
rust-nodemap: automatically use the rust index for persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44495
diff
changeset
|
99 tip-rev: 5001 |
44515
6c906eaedd0d
nodemap: track the tip_node for validation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44513
diff
changeset
|
100 tip-node: 2dd9b5258caa46469ff07d4a3da1eb3529a51f49 |
44513
e7fff9c3cdac
rust-nodemap: automatically use the rust index for persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44495
diff
changeset
|
101 data-length: 122880 |
e7fff9c3cdac
rust-nodemap: automatically use the rust index for persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44495
diff
changeset
|
102 data-unused: 0 |
44635
99ea74cbed74
nodemap: display percentage of unused in `hg debugnodemap`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44634
diff
changeset
|
103 data-unused: 0.000% |
44513
e7fff9c3cdac
rust-nodemap: automatically use the rust index for persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44495
diff
changeset
|
104 #else |
44334
6614b301ea58
nodemap: add a flag to dump the details of the docket
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44333
diff
changeset
|
105 $ hg debugnodemap --metadata |
6614b301ea58
nodemap: add a flag to dump the details of the docket
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44333
diff
changeset
|
106 uid: ???????????????? (glob) |
44335
e41a164db7a9
nodemap: track the maximum revision tracked in the nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44334
diff
changeset
|
107 tip-rev: 5001 |
44515
6c906eaedd0d
nodemap: track the tip_node for validation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44513
diff
changeset
|
108 tip-node: 2dd9b5258caa46469ff07d4a3da1eb3529a51f49 |
44336
8374b69aef75
nodemap: track the total and unused amount of data in the rawdata file
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44335
diff
changeset
|
109 data-length: 123072 |
8374b69aef75
nodemap: track the total and unused amount of data in the rawdata file
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44335
diff
changeset
|
110 data-unused: 192 |
44635
99ea74cbed74
nodemap: display percentage of unused in `hg debugnodemap`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44634
diff
changeset
|
111 data-unused: 0.156% |
44336
8374b69aef75
nodemap: track the total and unused amount of data in the rawdata file
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44335
diff
changeset
|
112 #endif |
44513
e7fff9c3cdac
rust-nodemap: automatically use the rust index for persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44495
diff
changeset
|
113 |
44312
563dfdfd01a4
nodemap: delete older raw data file when creating a new ones
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44311
diff
changeset
|
114 $ f --size .hg/store/00changelog.n |
44515
6c906eaedd0d
nodemap: track the tip_node for validation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44513
diff
changeset
|
115 .hg/store/00changelog.n: size=70 |
44333
50ad851efd9b
nodemap: introduce append-only incremental update of the persistent data
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44318
diff
changeset
|
116 |
50ad851efd9b
nodemap: introduce append-only incremental update of the persistent data
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44318
diff
changeset
|
117 (The pure code use the debug code that perform incremental update, the C code reencode from scratch) |
50ad851efd9b
nodemap: introduce append-only incremental update of the persistent data
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44318
diff
changeset
|
118 |
50ad851efd9b
nodemap: introduce append-only incremental update of the persistent data
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44318
diff
changeset
|
119 #if pure |
50ad851efd9b
nodemap: introduce append-only incremental update of the persistent data
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44318
diff
changeset
|
120 $ f --sha256 .hg/store/00changelog-*.nd --size |
50ad851efd9b
nodemap: introduce append-only incremental update of the persistent data
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44318
diff
changeset
|
121 .hg/store/00changelog-????????????????.nd: size=123072, sha256=136472751566c8198ff09e306a7d2f9bd18bd32298d614752b73da4d6df23340 (glob) |
44513
e7fff9c3cdac
rust-nodemap: automatically use the rust index for persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44495
diff
changeset
|
122 #endif |
44333
50ad851efd9b
nodemap: introduce append-only incremental update of the persistent data
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44318
diff
changeset
|
123 |
44513
e7fff9c3cdac
rust-nodemap: automatically use the rust index for persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44495
diff
changeset
|
124 #if rust |
e7fff9c3cdac
rust-nodemap: automatically use the rust index for persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44495
diff
changeset
|
125 $ f --sha256 .hg/store/00changelog-*.nd --size |
e7fff9c3cdac
rust-nodemap: automatically use the rust index for persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44495
diff
changeset
|
126 .hg/store/00changelog-????????????????.nd: size=123072, sha256=ccc8a43310ace13812fcc648683e259346754ef934c12dd238cf9b7fadfe9a4b (glob) |
e7fff9c3cdac
rust-nodemap: automatically use the rust index for persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44495
diff
changeset
|
127 #endif |
e7fff9c3cdac
rust-nodemap: automatically use the rust index for persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44495
diff
changeset
|
128 |
e7fff9c3cdac
rust-nodemap: automatically use the rust index for persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44495
diff
changeset
|
129 #if no-pure no-rust |
44312
563dfdfd01a4
nodemap: delete older raw data file when creating a new ones
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44311
diff
changeset
|
130 $ f --sha256 .hg/store/00changelog-*.nd --size |
563dfdfd01a4
nodemap: delete older raw data file when creating a new ones
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44311
diff
changeset
|
131 .hg/store/00changelog-????????????????.nd: size=122880, sha256=bfafebd751c4f6d116a76a37a1dee2a251747affe7efbcc4f4842ccc746d4db9 (glob) |
44333
50ad851efd9b
nodemap: introduce append-only incremental update of the persistent data
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44318
diff
changeset
|
132 #endif |
50ad851efd9b
nodemap: introduce append-only incremental update of the persistent data
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44318
diff
changeset
|
133 |
44318
20e125cdd719
nodemap: add basic checking of the on disk nodemap content
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44313
diff
changeset
|
134 $ hg debugnodemap --check |
20e125cdd719
nodemap: add basic checking of the on disk nodemap content
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44313
diff
changeset
|
135 revision in index: 5002 |
20e125cdd719
nodemap: add basic checking of the on disk nodemap content
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44313
diff
changeset
|
136 revision in nodemap: 5002 |
44363
f7459da77f23
nodemap: introduce an option to use mmap to read the nodemap mapping
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44336
diff
changeset
|
137 |
f7459da77f23
nodemap: introduce an option to use mmap to read the nodemap mapping
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44336
diff
changeset
|
138 Test code path without mmap |
f7459da77f23
nodemap: introduce an option to use mmap to read the nodemap mapping
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44336
diff
changeset
|
139 --------------------------- |
f7459da77f23
nodemap: introduce an option to use mmap to read the nodemap mapping
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44336
diff
changeset
|
140 |
f7459da77f23
nodemap: introduce an option to use mmap to read the nodemap mapping
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44336
diff
changeset
|
141 $ echo bar > bar |
f7459da77f23
nodemap: introduce an option to use mmap to read the nodemap mapping
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44336
diff
changeset
|
142 $ hg add bar |
f7459da77f23
nodemap: introduce an option to use mmap to read the nodemap mapping
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44336
diff
changeset
|
143 $ hg ci -m 'bar' --config experimental.exp-persistent-nodemap.mmap=no |
f7459da77f23
nodemap: introduce an option to use mmap to read the nodemap mapping
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44336
diff
changeset
|
144 |
f7459da77f23
nodemap: introduce an option to use mmap to read the nodemap mapping
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44336
diff
changeset
|
145 $ hg debugnodemap --check --config experimental.exp-persistent-nodemap.mmap=yes |
f7459da77f23
nodemap: introduce an option to use mmap to read the nodemap mapping
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44336
diff
changeset
|
146 revision in index: 5003 |
f7459da77f23
nodemap: introduce an option to use mmap to read the nodemap mapping
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44336
diff
changeset
|
147 revision in nodemap: 5003 |
f7459da77f23
nodemap: introduce an option to use mmap to read the nodemap mapping
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44336
diff
changeset
|
148 $ hg debugnodemap --check --config experimental.exp-persistent-nodemap.mmap=no |
f7459da77f23
nodemap: introduce an option to use mmap to read the nodemap mapping
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44336
diff
changeset
|
149 revision in index: 5003 |
f7459da77f23
nodemap: introduce an option to use mmap to read the nodemap mapping
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44336
diff
changeset
|
150 revision in nodemap: 5003 |
f7459da77f23
nodemap: introduce an option to use mmap to read the nodemap mapping
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44336
diff
changeset
|
151 |
f7459da77f23
nodemap: introduce an option to use mmap to read the nodemap mapping
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44336
diff
changeset
|
152 |
f7459da77f23
nodemap: introduce an option to use mmap to read the nodemap mapping
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44336
diff
changeset
|
153 #if pure |
f7459da77f23
nodemap: introduce an option to use mmap to read the nodemap mapping
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44336
diff
changeset
|
154 $ hg debugnodemap --metadata |
f7459da77f23
nodemap: introduce an option to use mmap to read the nodemap mapping
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44336
diff
changeset
|
155 uid: ???????????????? (glob) |
f7459da77f23
nodemap: introduce an option to use mmap to read the nodemap mapping
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44336
diff
changeset
|
156 tip-rev: 5002 |
44515
6c906eaedd0d
nodemap: track the tip_node for validation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44513
diff
changeset
|
157 tip-node: 6ce944fafcee85af91f29ea5b51654cc6101ad7e |
44363
f7459da77f23
nodemap: introduce an option to use mmap to read the nodemap mapping
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44336
diff
changeset
|
158 data-length: 123328 |
f7459da77f23
nodemap: introduce an option to use mmap to read the nodemap mapping
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44336
diff
changeset
|
159 data-unused: 384 |
44635
99ea74cbed74
nodemap: display percentage of unused in `hg debugnodemap`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44634
diff
changeset
|
160 data-unused: 0.311% |
44363
f7459da77f23
nodemap: introduce an option to use mmap to read the nodemap mapping
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44336
diff
changeset
|
161 $ f --sha256 .hg/store/00changelog-*.nd --size |
f7459da77f23
nodemap: introduce an option to use mmap to read the nodemap mapping
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44336
diff
changeset
|
162 .hg/store/00changelog-????????????????.nd: size=123328, sha256=10d26e9776b6596af0f89143a54eba8cc581e929c38242a02a7b0760698c6c70 (glob) |
44513
e7fff9c3cdac
rust-nodemap: automatically use the rust index for persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44495
diff
changeset
|
163 #endif |
e7fff9c3cdac
rust-nodemap: automatically use the rust index for persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44495
diff
changeset
|
164 #if rust |
e7fff9c3cdac
rust-nodemap: automatically use the rust index for persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44495
diff
changeset
|
165 $ hg debugnodemap --metadata |
e7fff9c3cdac
rust-nodemap: automatically use the rust index for persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44495
diff
changeset
|
166 uid: ???????????????? (glob) |
e7fff9c3cdac
rust-nodemap: automatically use the rust index for persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44495
diff
changeset
|
167 tip-rev: 5002 |
44515
6c906eaedd0d
nodemap: track the tip_node for validation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44513
diff
changeset
|
168 tip-node: 6ce944fafcee85af91f29ea5b51654cc6101ad7e |
44513
e7fff9c3cdac
rust-nodemap: automatically use the rust index for persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44495
diff
changeset
|
169 data-length: 123328 |
e7fff9c3cdac
rust-nodemap: automatically use the rust index for persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44495
diff
changeset
|
170 data-unused: 384 |
44635
99ea74cbed74
nodemap: display percentage of unused in `hg debugnodemap`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44634
diff
changeset
|
171 data-unused: 0.311% |
44513
e7fff9c3cdac
rust-nodemap: automatically use the rust index for persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44495
diff
changeset
|
172 $ f --sha256 .hg/store/00changelog-*.nd --size |
e7fff9c3cdac
rust-nodemap: automatically use the rust index for persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44495
diff
changeset
|
173 .hg/store/00changelog-????????????????.nd: size=123328, sha256=081eec9eb6708f2bf085d939b4c97bc0b6762bc8336bc4b93838f7fffa1516bf (glob) |
e7fff9c3cdac
rust-nodemap: automatically use the rust index for persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44495
diff
changeset
|
174 #endif |
e7fff9c3cdac
rust-nodemap: automatically use the rust index for persistent nodemap
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44495
diff
changeset
|
175 #if no-pure no-rust |
44363
f7459da77f23
nodemap: introduce an option to use mmap to read the nodemap mapping
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44336
diff
changeset
|
176 $ hg debugnodemap --metadata |
f7459da77f23
nodemap: introduce an option to use mmap to read the nodemap mapping
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44336
diff
changeset
|
177 uid: ???????????????? (glob) |
f7459da77f23
nodemap: introduce an option to use mmap to read the nodemap mapping
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44336
diff
changeset
|
178 tip-rev: 5002 |
44515
6c906eaedd0d
nodemap: track the tip_node for validation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44513
diff
changeset
|
179 tip-node: 6ce944fafcee85af91f29ea5b51654cc6101ad7e |
44363
f7459da77f23
nodemap: introduce an option to use mmap to read the nodemap mapping
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44336
diff
changeset
|
180 data-length: 122944 |
f7459da77f23
nodemap: introduce an option to use mmap to read the nodemap mapping
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44336
diff
changeset
|
181 data-unused: 0 |
44635
99ea74cbed74
nodemap: display percentage of unused in `hg debugnodemap`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44634
diff
changeset
|
182 data-unused: 0.000% |
44363
f7459da77f23
nodemap: introduce an option to use mmap to read the nodemap mapping
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44336
diff
changeset
|
183 $ f --sha256 .hg/store/00changelog-*.nd --size |
f7459da77f23
nodemap: introduce an option to use mmap to read the nodemap mapping
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44336
diff
changeset
|
184 .hg/store/00changelog-????????????????.nd: size=122944, sha256=755976b22b64ab680401b45395953504e64e7fa8c31ac570f58dee21e15f9bc0 (glob) |
f7459da77f23
nodemap: introduce an option to use mmap to read the nodemap mapping
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44336
diff
changeset
|
185 #endif |
44445
336ec75ed1ac
nodemap: warm the persistent nodemap on disk with debugupdatecache
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44363
diff
changeset
|
186 |
336ec75ed1ac
nodemap: warm the persistent nodemap on disk with debugupdatecache
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44363
diff
changeset
|
187 Test force warming the cache |
336ec75ed1ac
nodemap: warm the persistent nodemap on disk with debugupdatecache
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44363
diff
changeset
|
188 |
336ec75ed1ac
nodemap: warm the persistent nodemap on disk with debugupdatecache
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44363
diff
changeset
|
189 $ rm .hg/store/00changelog.n |
336ec75ed1ac
nodemap: warm the persistent nodemap on disk with debugupdatecache
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44363
diff
changeset
|
190 $ hg debugnodemap --metadata |
336ec75ed1ac
nodemap: warm the persistent nodemap on disk with debugupdatecache
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44363
diff
changeset
|
191 $ hg debugupdatecache |
336ec75ed1ac
nodemap: warm the persistent nodemap on disk with debugupdatecache
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44363
diff
changeset
|
192 #if pure |
336ec75ed1ac
nodemap: warm the persistent nodemap on disk with debugupdatecache
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44363
diff
changeset
|
193 $ hg debugnodemap --metadata |
336ec75ed1ac
nodemap: warm the persistent nodemap on disk with debugupdatecache
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44363
diff
changeset
|
194 uid: ???????????????? (glob) |
336ec75ed1ac
nodemap: warm the persistent nodemap on disk with debugupdatecache
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44363
diff
changeset
|
195 tip-rev: 5002 |
44515
6c906eaedd0d
nodemap: track the tip_node for validation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44513
diff
changeset
|
196 tip-node: 6ce944fafcee85af91f29ea5b51654cc6101ad7e |
44445
336ec75ed1ac
nodemap: warm the persistent nodemap on disk with debugupdatecache
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44363
diff
changeset
|
197 data-length: 122944 |
336ec75ed1ac
nodemap: warm the persistent nodemap on disk with debugupdatecache
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44363
diff
changeset
|
198 data-unused: 0 |
44635
99ea74cbed74
nodemap: display percentage of unused in `hg debugnodemap`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44634
diff
changeset
|
199 data-unused: 0.000% |
44445
336ec75ed1ac
nodemap: warm the persistent nodemap on disk with debugupdatecache
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44363
diff
changeset
|
200 #else |
336ec75ed1ac
nodemap: warm the persistent nodemap on disk with debugupdatecache
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44363
diff
changeset
|
201 $ hg debugnodemap --metadata |
336ec75ed1ac
nodemap: warm the persistent nodemap on disk with debugupdatecache
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44363
diff
changeset
|
202 uid: ???????????????? (glob) |
336ec75ed1ac
nodemap: warm the persistent nodemap on disk with debugupdatecache
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44363
diff
changeset
|
203 tip-rev: 5002 |
44515
6c906eaedd0d
nodemap: track the tip_node for validation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44513
diff
changeset
|
204 tip-node: 6ce944fafcee85af91f29ea5b51654cc6101ad7e |
44445
336ec75ed1ac
nodemap: warm the persistent nodemap on disk with debugupdatecache
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44363
diff
changeset
|
205 data-length: 122944 |
336ec75ed1ac
nodemap: warm the persistent nodemap on disk with debugupdatecache
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44363
diff
changeset
|
206 data-unused: 0 |
44635
99ea74cbed74
nodemap: display percentage of unused in `hg debugnodemap`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44634
diff
changeset
|
207 data-unused: 0.000% |
44445
336ec75ed1ac
nodemap: warm the persistent nodemap on disk with debugupdatecache
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44363
diff
changeset
|
208 #endif |
44495
1376cb1c8e34
nodemap: test that an outdated nodemap can catch up
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44464
diff
changeset
|
209 |
1376cb1c8e34
nodemap: test that an outdated nodemap can catch up
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44464
diff
changeset
|
210 Check out of sync nodemap |
1376cb1c8e34
nodemap: test that an outdated nodemap can catch up
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44464
diff
changeset
|
211 ========================= |
1376cb1c8e34
nodemap: test that an outdated nodemap can catch up
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44464
diff
changeset
|
212 |
1376cb1c8e34
nodemap: test that an outdated nodemap can catch up
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44464
diff
changeset
|
213 First copy old data on the side. |
1376cb1c8e34
nodemap: test that an outdated nodemap can catch up
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44464
diff
changeset
|
214 |
1376cb1c8e34
nodemap: test that an outdated nodemap can catch up
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44464
diff
changeset
|
215 $ mkdir ../tmp-copies |
1376cb1c8e34
nodemap: test that an outdated nodemap can catch up
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44464
diff
changeset
|
216 $ cp .hg/store/00changelog-????????????????.nd .hg/store/00changelog.n ../tmp-copies |
1376cb1c8e34
nodemap: test that an outdated nodemap can catch up
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44464
diff
changeset
|
217 |
1376cb1c8e34
nodemap: test that an outdated nodemap can catch up
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44464
diff
changeset
|
218 Nodemap lagging behind |
1376cb1c8e34
nodemap: test that an outdated nodemap can catch up
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44464
diff
changeset
|
219 ---------------------- |
1376cb1c8e34
nodemap: test that an outdated nodemap can catch up
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44464
diff
changeset
|
220 |
1376cb1c8e34
nodemap: test that an outdated nodemap can catch up
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44464
diff
changeset
|
221 make a new commit |
1376cb1c8e34
nodemap: test that an outdated nodemap can catch up
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44464
diff
changeset
|
222 |
1376cb1c8e34
nodemap: test that an outdated nodemap can catch up
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44464
diff
changeset
|
223 $ echo bar2 > bar |
1376cb1c8e34
nodemap: test that an outdated nodemap can catch up
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44464
diff
changeset
|
224 $ hg ci -m 'bar2' |
1376cb1c8e34
nodemap: test that an outdated nodemap can catch up
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44464
diff
changeset
|
225 $ NODE=`hg log -r tip -T '{node}\n'` |
1376cb1c8e34
nodemap: test that an outdated nodemap can catch up
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44464
diff
changeset
|
226 $ hg log -r "$NODE" -T '{rev}\n' |
1376cb1c8e34
nodemap: test that an outdated nodemap can catch up
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44464
diff
changeset
|
227 5003 |
1376cb1c8e34
nodemap: test that an outdated nodemap can catch up
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44464
diff
changeset
|
228 |
1376cb1c8e34
nodemap: test that an outdated nodemap can catch up
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44464
diff
changeset
|
229 If the nodemap is lagging behind, it can catch up fine |
1376cb1c8e34
nodemap: test that an outdated nodemap can catch up
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44464
diff
changeset
|
230 |
1376cb1c8e34
nodemap: test that an outdated nodemap can catch up
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44464
diff
changeset
|
231 $ hg debugnodemap --metadata |
1376cb1c8e34
nodemap: test that an outdated nodemap can catch up
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44464
diff
changeset
|
232 uid: ???????????????? (glob) |
1376cb1c8e34
nodemap: test that an outdated nodemap can catch up
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44464
diff
changeset
|
233 tip-rev: 5003 |
44515
6c906eaedd0d
nodemap: track the tip_node for validation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44513
diff
changeset
|
234 tip-node: 5c049e9c4a4af159bdcd65dce1b6bf303a0da6cf |
44495
1376cb1c8e34
nodemap: test that an outdated nodemap can catch up
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44464
diff
changeset
|
235 data-length: 123200 (pure !) |
1376cb1c8e34
nodemap: test that an outdated nodemap can catch up
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44464
diff
changeset
|
236 data-length: 123200 (rust !) |
1376cb1c8e34
nodemap: test that an outdated nodemap can catch up
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44464
diff
changeset
|
237 data-length: 122944 (no-rust no-pure !) |
1376cb1c8e34
nodemap: test that an outdated nodemap can catch up
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44464
diff
changeset
|
238 data-unused: 256 (pure !) |
1376cb1c8e34
nodemap: test that an outdated nodemap can catch up
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44464
diff
changeset
|
239 data-unused: 256 (rust !) |
1376cb1c8e34
nodemap: test that an outdated nodemap can catch up
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44464
diff
changeset
|
240 data-unused: 0 (no-rust no-pure !) |
44635
99ea74cbed74
nodemap: display percentage of unused in `hg debugnodemap`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44634
diff
changeset
|
241 data-unused: 0.208% (pure !) |
99ea74cbed74
nodemap: display percentage of unused in `hg debugnodemap`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44634
diff
changeset
|
242 data-unused: 0.208% (rust !) |
99ea74cbed74
nodemap: display percentage of unused in `hg debugnodemap`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44634
diff
changeset
|
243 data-unused: 0.000% (no-rust no-pure !) |
44495
1376cb1c8e34
nodemap: test that an outdated nodemap can catch up
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44464
diff
changeset
|
244 $ cp -f ../tmp-copies/* .hg/store/ |
1376cb1c8e34
nodemap: test that an outdated nodemap can catch up
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44464
diff
changeset
|
245 $ hg debugnodemap --metadata |
1376cb1c8e34
nodemap: test that an outdated nodemap can catch up
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44464
diff
changeset
|
246 uid: ???????????????? (glob) |
1376cb1c8e34
nodemap: test that an outdated nodemap can catch up
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44464
diff
changeset
|
247 tip-rev: 5002 |
44515
6c906eaedd0d
nodemap: track the tip_node for validation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44513
diff
changeset
|
248 tip-node: 6ce944fafcee85af91f29ea5b51654cc6101ad7e |
44495
1376cb1c8e34
nodemap: test that an outdated nodemap can catch up
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44464
diff
changeset
|
249 data-length: 122944 |
1376cb1c8e34
nodemap: test that an outdated nodemap can catch up
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44464
diff
changeset
|
250 data-unused: 0 |
44635
99ea74cbed74
nodemap: display percentage of unused in `hg debugnodemap`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44634
diff
changeset
|
251 data-unused: 0.000% |
44495
1376cb1c8e34
nodemap: test that an outdated nodemap can catch up
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44464
diff
changeset
|
252 $ hg log -r "$NODE" -T '{rev}\n' |
1376cb1c8e34
nodemap: test that an outdated nodemap can catch up
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44464
diff
changeset
|
253 5003 |
44515
6c906eaedd0d
nodemap: track the tip_node for validation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44513
diff
changeset
|
254 |
6c906eaedd0d
nodemap: track the tip_node for validation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44513
diff
changeset
|
255 changelog altered |
6c906eaedd0d
nodemap: track the tip_node for validation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44513
diff
changeset
|
256 ----------------- |
6c906eaedd0d
nodemap: track the tip_node for validation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44513
diff
changeset
|
257 |
6c906eaedd0d
nodemap: track the tip_node for validation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44513
diff
changeset
|
258 If the nodemap is not gated behind a requirements, an unaware client can alter |
6c906eaedd0d
nodemap: track the tip_node for validation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44513
diff
changeset
|
259 the repository so the revlog used to generate the nodemap is not longer |
6c906eaedd0d
nodemap: track the tip_node for validation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44513
diff
changeset
|
260 compatible with the persistent nodemap. We need to detect that. |
6c906eaedd0d
nodemap: track the tip_node for validation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44513
diff
changeset
|
261 |
6c906eaedd0d
nodemap: track the tip_node for validation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44513
diff
changeset
|
262 $ hg up "$NODE~5" |
6c906eaedd0d
nodemap: track the tip_node for validation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44513
diff
changeset
|
263 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
6c906eaedd0d
nodemap: track the tip_node for validation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44513
diff
changeset
|
264 $ echo bar > babar |
6c906eaedd0d
nodemap: track the tip_node for validation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44513
diff
changeset
|
265 $ hg add babar |
6c906eaedd0d
nodemap: track the tip_node for validation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44513
diff
changeset
|
266 $ hg ci -m 'babar' |
6c906eaedd0d
nodemap: track the tip_node for validation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44513
diff
changeset
|
267 created new head |
6c906eaedd0d
nodemap: track the tip_node for validation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44513
diff
changeset
|
268 $ OTHERNODE=`hg log -r tip -T '{node}\n'` |
6c906eaedd0d
nodemap: track the tip_node for validation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44513
diff
changeset
|
269 $ hg log -r "$OTHERNODE" -T '{rev}\n' |
6c906eaedd0d
nodemap: track the tip_node for validation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44513
diff
changeset
|
270 5004 |
6c906eaedd0d
nodemap: track the tip_node for validation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44513
diff
changeset
|
271 |
6c906eaedd0d
nodemap: track the tip_node for validation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44513
diff
changeset
|
272 $ hg --config extensions.strip= strip --rev "$NODE~1" --no-backup |
6c906eaedd0d
nodemap: track the tip_node for validation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44513
diff
changeset
|
273 |
6c906eaedd0d
nodemap: track the tip_node for validation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44513
diff
changeset
|
274 the nodemap should detect the changelog have been tampered with and recover. |
6c906eaedd0d
nodemap: track the tip_node for validation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44513
diff
changeset
|
275 |
6c906eaedd0d
nodemap: track the tip_node for validation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44513
diff
changeset
|
276 $ hg debugnodemap --metadata |
6c906eaedd0d
nodemap: track the tip_node for validation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44513
diff
changeset
|
277 uid: ???????????????? (glob) |
6c906eaedd0d
nodemap: track the tip_node for validation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44513
diff
changeset
|
278 tip-rev: 5002 |
6c906eaedd0d
nodemap: track the tip_node for validation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44513
diff
changeset
|
279 tip-node: 42bf3068c7ddfdfded53c4eb11d02266faeebfee |
6c906eaedd0d
nodemap: track the tip_node for validation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44513
diff
changeset
|
280 data-length: 123456 (pure !) |
44636
c70bcaf7927b
nodemap: automatically "vacuum" the persistent nodemap when too sparse
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44635
diff
changeset
|
281 data-length: 123008 (rust !) |
44515
6c906eaedd0d
nodemap: track the tip_node for validation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44513
diff
changeset
|
282 data-length: 123008 (no-pure no-rust !) |
6c906eaedd0d
nodemap: track the tip_node for validation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44513
diff
changeset
|
283 data-unused: 448 (pure !) |
44636
c70bcaf7927b
nodemap: automatically "vacuum" the persistent nodemap when too sparse
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44635
diff
changeset
|
284 data-unused: 0 (rust !) |
44515
6c906eaedd0d
nodemap: track the tip_node for validation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44513
diff
changeset
|
285 data-unused: 0 (no-pure no-rust !) |
44636
c70bcaf7927b
nodemap: automatically "vacuum" the persistent nodemap when too sparse
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44635
diff
changeset
|
286 data-unused: 0.000% (rust !) |
44635
99ea74cbed74
nodemap: display percentage of unused in `hg debugnodemap`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44634
diff
changeset
|
287 data-unused: 0.363% (pure !) |
99ea74cbed74
nodemap: display percentage of unused in `hg debugnodemap`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44634
diff
changeset
|
288 data-unused: 0.000% (no-pure no-rust !) |
44515
6c906eaedd0d
nodemap: track the tip_node for validation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44513
diff
changeset
|
289 |
6c906eaedd0d
nodemap: track the tip_node for validation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44513
diff
changeset
|
290 $ cp -f ../tmp-copies/* .hg/store/ |
6c906eaedd0d
nodemap: track the tip_node for validation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44513
diff
changeset
|
291 $ hg debugnodemap --metadata |
6c906eaedd0d
nodemap: track the tip_node for validation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44513
diff
changeset
|
292 uid: ???????????????? (glob) |
6c906eaedd0d
nodemap: track the tip_node for validation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44513
diff
changeset
|
293 tip-rev: 5002 |
6c906eaedd0d
nodemap: track the tip_node for validation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44513
diff
changeset
|
294 tip-node: 6ce944fafcee85af91f29ea5b51654cc6101ad7e |
6c906eaedd0d
nodemap: track the tip_node for validation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44513
diff
changeset
|
295 data-length: 122944 |
6c906eaedd0d
nodemap: track the tip_node for validation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44513
diff
changeset
|
296 data-unused: 0 |
44635
99ea74cbed74
nodemap: display percentage of unused in `hg debugnodemap`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44634
diff
changeset
|
297 data-unused: 0.000% |
44515
6c906eaedd0d
nodemap: track the tip_node for validation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44513
diff
changeset
|
298 $ hg log -r "$OTHERNODE" -T '{rev}\n' |
6c906eaedd0d
nodemap: track the tip_node for validation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44513
diff
changeset
|
299 5002 |
44516
64e2f603de9d
nodemap: make sure hooks have access to an up-to-date version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44515
diff
changeset
|
300 |
64e2f603de9d
nodemap: make sure hooks have access to an up-to-date version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44515
diff
changeset
|
301 Check transaction related property |
64e2f603de9d
nodemap: make sure hooks have access to an up-to-date version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44515
diff
changeset
|
302 ================================== |
64e2f603de9d
nodemap: make sure hooks have access to an up-to-date version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44515
diff
changeset
|
303 |
64e2f603de9d
nodemap: make sure hooks have access to an up-to-date version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44515
diff
changeset
|
304 An up to date nodemap should be available to shell hooks, |
64e2f603de9d
nodemap: make sure hooks have access to an up-to-date version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44515
diff
changeset
|
305 |
64e2f603de9d
nodemap: make sure hooks have access to an up-to-date version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44515
diff
changeset
|
306 $ echo dsljfl > a |
64e2f603de9d
nodemap: make sure hooks have access to an up-to-date version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44515
diff
changeset
|
307 $ hg add a |
64e2f603de9d
nodemap: make sure hooks have access to an up-to-date version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44515
diff
changeset
|
308 $ hg ci -m a |
64e2f603de9d
nodemap: make sure hooks have access to an up-to-date version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44515
diff
changeset
|
309 $ hg debugnodemap --metadata |
64e2f603de9d
nodemap: make sure hooks have access to an up-to-date version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44515
diff
changeset
|
310 uid: ???????????????? (glob) |
64e2f603de9d
nodemap: make sure hooks have access to an up-to-date version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44515
diff
changeset
|
311 tip-rev: 5003 |
64e2f603de9d
nodemap: make sure hooks have access to an up-to-date version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44515
diff
changeset
|
312 tip-node: c91af76d172f1053cca41b83f7c2e4e514fe2bcf |
64e2f603de9d
nodemap: make sure hooks have access to an up-to-date version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44515
diff
changeset
|
313 data-length: 123008 |
64e2f603de9d
nodemap: make sure hooks have access to an up-to-date version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44515
diff
changeset
|
314 data-unused: 0 |
44635
99ea74cbed74
nodemap: display percentage of unused in `hg debugnodemap`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44634
diff
changeset
|
315 data-unused: 0.000% |
44516
64e2f603de9d
nodemap: make sure hooks have access to an up-to-date version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44515
diff
changeset
|
316 $ echo babar2 > babar |
64e2f603de9d
nodemap: make sure hooks have access to an up-to-date version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44515
diff
changeset
|
317 $ hg ci -m 'babar2' --config "hooks.pretxnclose.nodemap-test=hg debugnodemap --metadata" |
64e2f603de9d
nodemap: make sure hooks have access to an up-to-date version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44515
diff
changeset
|
318 uid: ???????????????? (glob) |
64e2f603de9d
nodemap: make sure hooks have access to an up-to-date version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44515
diff
changeset
|
319 tip-rev: 5004 |
64e2f603de9d
nodemap: make sure hooks have access to an up-to-date version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44515
diff
changeset
|
320 tip-node: ba87cd9559559e4b91b28cb140d003985315e031 |
64e2f603de9d
nodemap: make sure hooks have access to an up-to-date version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44515
diff
changeset
|
321 data-length: 123328 (pure !) |
64e2f603de9d
nodemap: make sure hooks have access to an up-to-date version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44515
diff
changeset
|
322 data-length: 123328 (rust !) |
64e2f603de9d
nodemap: make sure hooks have access to an up-to-date version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44515
diff
changeset
|
323 data-length: 123136 (no-pure no-rust !) |
64e2f603de9d
nodemap: make sure hooks have access to an up-to-date version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44515
diff
changeset
|
324 data-unused: 192 (pure !) |
64e2f603de9d
nodemap: make sure hooks have access to an up-to-date version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44515
diff
changeset
|
325 data-unused: 192 (rust !) |
64e2f603de9d
nodemap: make sure hooks have access to an up-to-date version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44515
diff
changeset
|
326 data-unused: 0 (no-pure no-rust !) |
44635
99ea74cbed74
nodemap: display percentage of unused in `hg debugnodemap`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44634
diff
changeset
|
327 data-unused: 0.156% (pure !) |
99ea74cbed74
nodemap: display percentage of unused in `hg debugnodemap`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44634
diff
changeset
|
328 data-unused: 0.156% (rust !) |
99ea74cbed74
nodemap: display percentage of unused in `hg debugnodemap`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44634
diff
changeset
|
329 data-unused: 0.000% (no-pure no-rust !) |
44516
64e2f603de9d
nodemap: make sure hooks have access to an up-to-date version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44515
diff
changeset
|
330 $ hg debugnodemap --metadata |
64e2f603de9d
nodemap: make sure hooks have access to an up-to-date version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44515
diff
changeset
|
331 uid: ???????????????? (glob) |
64e2f603de9d
nodemap: make sure hooks have access to an up-to-date version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44515
diff
changeset
|
332 tip-rev: 5004 |
64e2f603de9d
nodemap: make sure hooks have access to an up-to-date version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44515
diff
changeset
|
333 tip-node: ba87cd9559559e4b91b28cb140d003985315e031 |
64e2f603de9d
nodemap: make sure hooks have access to an up-to-date version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44515
diff
changeset
|
334 data-length: 123328 (pure !) |
64e2f603de9d
nodemap: make sure hooks have access to an up-to-date version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44515
diff
changeset
|
335 data-length: 123328 (rust !) |
64e2f603de9d
nodemap: make sure hooks have access to an up-to-date version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44515
diff
changeset
|
336 data-length: 123136 (no-pure no-rust !) |
64e2f603de9d
nodemap: make sure hooks have access to an up-to-date version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44515
diff
changeset
|
337 data-unused: 192 (pure !) |
64e2f603de9d
nodemap: make sure hooks have access to an up-to-date version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44515
diff
changeset
|
338 data-unused: 192 (rust !) |
64e2f603de9d
nodemap: make sure hooks have access to an up-to-date version
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44515
diff
changeset
|
339 data-unused: 0 (no-pure no-rust !) |
44635
99ea74cbed74
nodemap: display percentage of unused in `hg debugnodemap`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44634
diff
changeset
|
340 data-unused: 0.156% (pure !) |
99ea74cbed74
nodemap: display percentage of unused in `hg debugnodemap`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44634
diff
changeset
|
341 data-unused: 0.156% (rust !) |
99ea74cbed74
nodemap: display percentage of unused in `hg debugnodemap`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44634
diff
changeset
|
342 data-unused: 0.000% (no-pure no-rust !) |
44633
dd5b47fb0860
nodemap: test that concurrent process don't see the pending transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44516
diff
changeset
|
343 |
dd5b47fb0860
nodemap: test that concurrent process don't see the pending transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44516
diff
changeset
|
344 Another process does not see the pending nodemap content during run. |
dd5b47fb0860
nodemap: test that concurrent process don't see the pending transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44516
diff
changeset
|
345 |
dd5b47fb0860
nodemap: test that concurrent process don't see the pending transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44516
diff
changeset
|
346 $ PATH=$RUNTESTDIR/testlib/:$PATH |
dd5b47fb0860
nodemap: test that concurrent process don't see the pending transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44516
diff
changeset
|
347 $ echo qpoasp > a |
dd5b47fb0860
nodemap: test that concurrent process don't see the pending transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44516
diff
changeset
|
348 $ hg ci -m a2 \ |
dd5b47fb0860
nodemap: test that concurrent process don't see the pending transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44516
diff
changeset
|
349 > --config "hooks.pretxnclose=wait-on-file 20 sync-repo-read sync-txn-pending" \ |
dd5b47fb0860
nodemap: test that concurrent process don't see the pending transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44516
diff
changeset
|
350 > --config "hooks.txnclose=touch sync-txn-close" > output.txt 2>&1 & |
dd5b47fb0860
nodemap: test that concurrent process don't see the pending transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44516
diff
changeset
|
351 |
dd5b47fb0860
nodemap: test that concurrent process don't see the pending transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44516
diff
changeset
|
352 (read the repository while the commit transaction is pending) |
dd5b47fb0860
nodemap: test that concurrent process don't see the pending transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44516
diff
changeset
|
353 |
dd5b47fb0860
nodemap: test that concurrent process don't see the pending transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44516
diff
changeset
|
354 $ wait-on-file 20 sync-txn-pending && \ |
dd5b47fb0860
nodemap: test that concurrent process don't see the pending transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44516
diff
changeset
|
355 > hg debugnodemap --metadata && \ |
dd5b47fb0860
nodemap: test that concurrent process don't see the pending transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44516
diff
changeset
|
356 > wait-on-file 20 sync-txn-close sync-repo-read |
dd5b47fb0860
nodemap: test that concurrent process don't see the pending transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44516
diff
changeset
|
357 uid: ???????????????? (glob) |
dd5b47fb0860
nodemap: test that concurrent process don't see the pending transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44516
diff
changeset
|
358 tip-rev: 5004 |
dd5b47fb0860
nodemap: test that concurrent process don't see the pending transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44516
diff
changeset
|
359 tip-node: ba87cd9559559e4b91b28cb140d003985315e031 |
dd5b47fb0860
nodemap: test that concurrent process don't see the pending transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44516
diff
changeset
|
360 data-length: 123328 (pure !) |
dd5b47fb0860
nodemap: test that concurrent process don't see the pending transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44516
diff
changeset
|
361 data-length: 123328 (rust !) |
dd5b47fb0860
nodemap: test that concurrent process don't see the pending transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44516
diff
changeset
|
362 data-length: 123136 (no-pure no-rust !) |
dd5b47fb0860
nodemap: test that concurrent process don't see the pending transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44516
diff
changeset
|
363 data-unused: 192 (pure !) |
dd5b47fb0860
nodemap: test that concurrent process don't see the pending transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44516
diff
changeset
|
364 data-unused: 192 (rust !) |
dd5b47fb0860
nodemap: test that concurrent process don't see the pending transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44516
diff
changeset
|
365 data-unused: 0 (no-pure no-rust !) |
44635
99ea74cbed74
nodemap: display percentage of unused in `hg debugnodemap`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44634
diff
changeset
|
366 data-unused: 0.156% (pure !) |
99ea74cbed74
nodemap: display percentage of unused in `hg debugnodemap`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44634
diff
changeset
|
367 data-unused: 0.156% (rust !) |
99ea74cbed74
nodemap: display percentage of unused in `hg debugnodemap`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44634
diff
changeset
|
368 data-unused: 0.000% (no-pure no-rust !) |
44633
dd5b47fb0860
nodemap: test that concurrent process don't see the pending transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44516
diff
changeset
|
369 $ hg debugnodemap --metadata |
dd5b47fb0860
nodemap: test that concurrent process don't see the pending transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44516
diff
changeset
|
370 uid: ???????????????? (glob) |
dd5b47fb0860
nodemap: test that concurrent process don't see the pending transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44516
diff
changeset
|
371 tip-rev: 5005 |
dd5b47fb0860
nodemap: test that concurrent process don't see the pending transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44516
diff
changeset
|
372 tip-node: bae4d45c759e30f1cb1a40e1382cf0e0414154db |
dd5b47fb0860
nodemap: test that concurrent process don't see the pending transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44516
diff
changeset
|
373 data-length: 123584 (pure !) |
dd5b47fb0860
nodemap: test that concurrent process don't see the pending transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44516
diff
changeset
|
374 data-length: 123584 (rust !) |
dd5b47fb0860
nodemap: test that concurrent process don't see the pending transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44516
diff
changeset
|
375 data-length: 123136 (no-pure no-rust !) |
dd5b47fb0860
nodemap: test that concurrent process don't see the pending transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44516
diff
changeset
|
376 data-unused: 448 (pure !) |
dd5b47fb0860
nodemap: test that concurrent process don't see the pending transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44516
diff
changeset
|
377 data-unused: 448 (rust !) |
dd5b47fb0860
nodemap: test that concurrent process don't see the pending transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44516
diff
changeset
|
378 data-unused: 0 (no-pure no-rust !) |
44635
99ea74cbed74
nodemap: display percentage of unused in `hg debugnodemap`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44634
diff
changeset
|
379 data-unused: 0.363% (pure !) |
99ea74cbed74
nodemap: display percentage of unused in `hg debugnodemap`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44634
diff
changeset
|
380 data-unused: 0.363% (rust !) |
99ea74cbed74
nodemap: display percentage of unused in `hg debugnodemap`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44634
diff
changeset
|
381 data-unused: 0.000% (no-pure no-rust !) |
44633
dd5b47fb0860
nodemap: test that concurrent process don't see the pending transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44516
diff
changeset
|
382 |
dd5b47fb0860
nodemap: test that concurrent process don't see the pending transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44516
diff
changeset
|
383 $ cat output.txt |
dd5b47fb0860
nodemap: test that concurrent process don't see the pending transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44516
diff
changeset
|
384 |
44634
01b0805534bb
nodemap: make sure on disk change get rolled back with the transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44633
diff
changeset
|
385 Check that a failing transaction will properly revert the data |
01b0805534bb
nodemap: make sure on disk change get rolled back with the transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44633
diff
changeset
|
386 |
01b0805534bb
nodemap: make sure on disk change get rolled back with the transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44633
diff
changeset
|
387 $ echo plakfe > a |
01b0805534bb
nodemap: make sure on disk change get rolled back with the transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44633
diff
changeset
|
388 $ f --size --sha256 .hg/store/00changelog-*.nd |
01b0805534bb
nodemap: make sure on disk change get rolled back with the transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44633
diff
changeset
|
389 .hg/store/00changelog-????????????????.nd: size=123584, sha256=8c6cef6fd3d3fac291968793ee19a4be6d0b8375e9508bd5c7d4a8879e8df180 (glob) (pure !) |
01b0805534bb
nodemap: make sure on disk change get rolled back with the transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44633
diff
changeset
|
390 .hg/store/00changelog-????????????????.nd: size=123584, sha256=eb9e9a4bcafdb5e1344bc8a0cbb3288b2106413b8efae6265fb8a7973d7e97f9 (glob) (rust !) |
01b0805534bb
nodemap: make sure on disk change get rolled back with the transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44633
diff
changeset
|
391 .hg/store/00changelog-????????????????.nd: size=123136, sha256=4f504f5a834db3811ced50ab3e9e80bcae3581bb0f9b13a7a9f94b7fc34bcebe (glob) (no-pure no-rust !) |
01b0805534bb
nodemap: make sure on disk change get rolled back with the transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44633
diff
changeset
|
392 $ hg ci -m a3 --config "extensions.abort=$RUNTESTDIR/testlib/crash_transaction_late.py" |
01b0805534bb
nodemap: make sure on disk change get rolled back with the transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44633
diff
changeset
|
393 transaction abort! |
01b0805534bb
nodemap: make sure on disk change get rolled back with the transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44633
diff
changeset
|
394 rollback completed |
01b0805534bb
nodemap: make sure on disk change get rolled back with the transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44633
diff
changeset
|
395 abort: This is a late abort |
01b0805534bb
nodemap: make sure on disk change get rolled back with the transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44633
diff
changeset
|
396 [255] |
01b0805534bb
nodemap: make sure on disk change get rolled back with the transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44633
diff
changeset
|
397 $ hg debugnodemap --metadata |
01b0805534bb
nodemap: make sure on disk change get rolled back with the transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44633
diff
changeset
|
398 uid: ???????????????? (glob) |
01b0805534bb
nodemap: make sure on disk change get rolled back with the transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44633
diff
changeset
|
399 tip-rev: 5005 |
01b0805534bb
nodemap: make sure on disk change get rolled back with the transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44633
diff
changeset
|
400 tip-node: bae4d45c759e30f1cb1a40e1382cf0e0414154db |
44635
99ea74cbed74
nodemap: display percentage of unused in `hg debugnodemap`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44634
diff
changeset
|
401 data-length: 123584 (pure !) |
99ea74cbed74
nodemap: display percentage of unused in `hg debugnodemap`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44634
diff
changeset
|
402 data-length: 123584 (rust !) |
99ea74cbed74
nodemap: display percentage of unused in `hg debugnodemap`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44634
diff
changeset
|
403 data-length: 123136 (no-pure no-rust !) |
99ea74cbed74
nodemap: display percentage of unused in `hg debugnodemap`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44634
diff
changeset
|
404 data-unused: 448 (pure !) |
99ea74cbed74
nodemap: display percentage of unused in `hg debugnodemap`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44634
diff
changeset
|
405 data-unused: 448 (rust !) |
99ea74cbed74
nodemap: display percentage of unused in `hg debugnodemap`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44634
diff
changeset
|
406 data-unused: 0 (no-pure no-rust !) |
99ea74cbed74
nodemap: display percentage of unused in `hg debugnodemap`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44634
diff
changeset
|
407 data-unused: 0.363% (pure !) |
99ea74cbed74
nodemap: display percentage of unused in `hg debugnodemap`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44634
diff
changeset
|
408 data-unused: 0.363% (rust !) |
99ea74cbed74
nodemap: display percentage of unused in `hg debugnodemap`
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44634
diff
changeset
|
409 data-unused: 0.000% (no-pure no-rust !) |
44634
01b0805534bb
nodemap: make sure on disk change get rolled back with the transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44633
diff
changeset
|
410 $ f --size --sha256 .hg/store/00changelog-*.nd |
01b0805534bb
nodemap: make sure on disk change get rolled back with the transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44633
diff
changeset
|
411 .hg/store/00changelog-????????????????.nd: size=123584, sha256=8c6cef6fd3d3fac291968793ee19a4be6d0b8375e9508bd5c7d4a8879e8df180 (glob) (pure !) |
01b0805534bb
nodemap: make sure on disk change get rolled back with the transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44633
diff
changeset
|
412 .hg/store/00changelog-????????????????.nd: size=123584, sha256=eb9e9a4bcafdb5e1344bc8a0cbb3288b2106413b8efae6265fb8a7973d7e97f9 (glob) (rust !) |
01b0805534bb
nodemap: make sure on disk change get rolled back with the transaction
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
44633
diff
changeset
|
413 .hg/store/00changelog-????????????????.nd: size=123136, sha256=4f504f5a834db3811ced50ab3e9e80bcae3581bb0f9b13a7a9f94b7fc34bcebe (glob) (no-pure no-rust !) |