author | Pierre-Yves David <pierre-yves.david@octobus.net> |
Mon, 25 Sep 2023 12:14:38 +0200 | |
changeset 51013 | 93a44c1ba0c6 |
parent 50799 | 02eae2df911a |
child 51181 | dcaa2df1f688 |
permissions | -rw-r--r-- |
37415
c2c8962a9465
simplestore: use a custom store for the simple store repo
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36662
diff
changeset
|
1 |
#require repofncache |
c2c8962a9465
simplestore: use a custom store for the simple store repo
Gregory Szorc <gregory.szorc@gmail.com>
parents:
36662
diff
changeset
|
2 |
|
41978
a56487081109
store: don't read the whole fncache in memory
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
41965
diff
changeset
|
3 |
An extension which will set fncache chunksize to 1 byte to make sure that logic |
a56487081109
store: don't read the whole fncache in memory
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
41965
diff
changeset
|
4 |
does not break |
a56487081109
store: don't read the whole fncache in memory
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
41965
diff
changeset
|
5 |
|
a56487081109
store: don't read the whole fncache in memory
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
41965
diff
changeset
|
6 |
$ cat > chunksize.py <<EOF |
a56487081109
store: don't read the whole fncache in memory
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
41965
diff
changeset
|
7 |
> from mercurial import store |
a56487081109
store: don't read the whole fncache in memory
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
41965
diff
changeset
|
8 |
> store.fncache_chunksize = 1 |
a56487081109
store: don't read the whole fncache in memory
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
41965
diff
changeset
|
9 |
> EOF |
a56487081109
store: don't read the whole fncache in memory
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
41965
diff
changeset
|
10 |
|
a56487081109
store: don't read the whole fncache in memory
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
41965
diff
changeset
|
11 |
$ cat >> $HGRCPATH <<EOF |
a56487081109
store: don't read the whole fncache in memory
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
41965
diff
changeset
|
12 |
> [extensions] |
a56487081109
store: don't read the whole fncache in memory
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
41965
diff
changeset
|
13 |
> chunksize = $TESTTMP/chunksize.py |
a56487081109
store: don't read the whole fncache in memory
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
41965
diff
changeset
|
14 |
> EOF |
a56487081109
store: don't read the whole fncache in memory
Pulkit Goyal <pulkit@yandex-team.ru>
parents:
41965
diff
changeset
|
15 |
|
11865
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
16 |
Init repo1: |
7290 | 17 |
|
11865
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
18 |
$ hg init repo1 |
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
19 |
$ cd repo1 |
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
20 |
$ echo "some text" > a |
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
21 |
$ hg add |
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
22 |
adding a |
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
23 |
$ hg ci -m first |
13389
3efc99ac2ac4
tests: sort fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
12316
diff
changeset
|
24 |
$ cat .hg/store/fncache | sort |
11865
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
25 |
data/a.i |
7290 | 26 |
|
11865
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
27 |
Testing a.i/b: |
7290 | 28 |
|
11865
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
29 |
$ mkdir a.i |
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
30 |
$ echo "some other text" > a.i/b |
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
31 |
$ hg add |
35393
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
33956
diff
changeset
|
32 |
adding a.i/b |
11865
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
33 |
$ hg ci -m second |
13389
3efc99ac2ac4
tests: sort fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
12316
diff
changeset
|
34 |
$ cat .hg/store/fncache | sort |
11865
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
35 |
data/a.i |
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
36 |
data/a.i.hg/b.i |
7290 | 37 |
|
11865
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
38 |
Testing a.i.hg/c: |
7290 | 39 |
|
11865
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
40 |
$ mkdir a.i.hg |
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
41 |
$ echo "yet another text" > a.i.hg/c |
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
42 |
$ hg add |
35393
4441705b7111
tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents:
33956
diff
changeset
|
43 |
adding a.i.hg/c |
11865
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
44 |
$ hg ci -m third |
13389
3efc99ac2ac4
tests: sort fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
12316
diff
changeset
|
45 |
$ cat .hg/store/fncache | sort |
11865
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
46 |
data/a.i |
13389
3efc99ac2ac4
tests: sort fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
12316
diff
changeset
|
47 |
data/a.i.hg.hg/c.i |
11865
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
48 |
data/a.i.hg/b.i |
7290 | 49 |
|
11865
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
50 |
Testing verify: |
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
51 |
|
49825
2f2682f40ea0
tests: use the `--quiet` flag for verify when applicable
Raphaël Gomès <rgomes@octobus.net>
parents:
48876
diff
changeset
|
52 |
$ hg verify -q |
11865
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
53 |
|
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
54 |
$ rm .hg/store/fncache |
7290 | 55 |
|
11865
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
56 |
$ hg verify |
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
57 |
checking changesets |
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
58 |
checking manifests |
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
59 |
crosschecking files in changesets and manifests |
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
60 |
checking files |
25627
9573d8f346f1
verify: clarify misleading fncache message
Matt Mackall <mpm@selenic.com>
parents:
23904
diff
changeset
|
61 |
warning: revlog 'data/a.i' not in fncache! |
9573d8f346f1
verify: clarify misleading fncache message
Matt Mackall <mpm@selenic.com>
parents:
23904
diff
changeset
|
62 |
warning: revlog 'data/a.i.hg/c.i' not in fncache! |
9573d8f346f1
verify: clarify misleading fncache message
Matt Mackall <mpm@selenic.com>
parents:
23904
diff
changeset
|
63 |
warning: revlog 'data/a.i/b.i' not in fncache! |
49826
c84844cd523a
verify: also check dirstate
Raphaël Gomès <rgomes@octobus.net>
parents:
49825
diff
changeset
|
64 |
checking dirstate |
39489
f1186c292d03
verify: make output less confusing (issue5924)
Meirambek Omyrzak <meirambek77@gmail.com>
parents:
39323
diff
changeset
|
65 |
checked 3 changesets with 3 changes to 3 files |
25627
9573d8f346f1
verify: clarify misleading fncache message
Matt Mackall <mpm@selenic.com>
parents:
23904
diff
changeset
|
66 |
3 warnings encountered! |
25653
9d1e04f5dca7
verify: print hint to run debugrebuildfncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25652
diff
changeset
|
67 |
hint: run "hg debugrebuildfncache" to recover from corrupt fncache |
9d1e04f5dca7
verify: print hint to run debugrebuildfncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25652
diff
changeset
|
68 |
|
9d1e04f5dca7
verify: print hint to run debugrebuildfncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25652
diff
changeset
|
69 |
Follow the hint to make sure it works |
9d1e04f5dca7
verify: print hint to run debugrebuildfncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25652
diff
changeset
|
70 |
|
9d1e04f5dca7
verify: print hint to run debugrebuildfncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25652
diff
changeset
|
71 |
$ hg debugrebuildfncache |
9d1e04f5dca7
verify: print hint to run debugrebuildfncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25652
diff
changeset
|
72 |
adding data/a.i |
9d1e04f5dca7
verify: print hint to run debugrebuildfncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25652
diff
changeset
|
73 |
adding data/a.i.hg/c.i |
9d1e04f5dca7
verify: print hint to run debugrebuildfncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25652
diff
changeset
|
74 |
adding data/a.i/b.i |
9d1e04f5dca7
verify: print hint to run debugrebuildfncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25652
diff
changeset
|
75 |
3 items added, 0 removed from fncache |
9d1e04f5dca7
verify: print hint to run debugrebuildfncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25652
diff
changeset
|
76 |
|
49825
2f2682f40ea0
tests: use the `--quiet` flag for verify when applicable
Raphaël Gomès <rgomes@octobus.net>
parents:
48876
diff
changeset
|
77 |
$ hg verify -q |
25653
9d1e04f5dca7
verify: print hint to run debugrebuildfncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25652
diff
changeset
|
78 |
|
11865
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
79 |
$ cd .. |
7290 | 80 |
|
11865
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
81 |
Non store repo: |
7290 | 82 |
|
11865
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
83 |
$ hg --config format.usestore=False init foo |
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
84 |
$ cd foo |
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
85 |
$ mkdir tst.d |
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
86 |
$ echo foo > tst.d/foo |
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
87 |
$ hg ci -Amfoo |
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
88 |
adding tst.d/foo |
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
89 |
$ find .hg | sort |
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
90 |
.hg |
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
91 |
.hg/00changelog.i |
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
92 |
.hg/00manifest.i |
50195
11e6eee4b063
transaction: use the standard transaction mechanism to backup branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
50194
diff
changeset
|
93 |
.hg/branch |
15886
a5917346c72e
localrepo: update branchcache in a more reliable way
Mads Kiilerich <mads@kiilerich.com>
parents:
15483
diff
changeset
|
94 |
.hg/cache |
20185
7d4219512823
branchmap: cache open/closed branch head information
Brodie Rao <brodie@sf.io>
parents:
18382
diff
changeset
|
95 |
.hg/cache/branch2-served |
23786
7d63398fbfd1
branchmap: use revbranchcache when updating branch map
Mads Kiilerich <madski@unity3d.com>
parents:
23512
diff
changeset
|
96 |
.hg/cache/rbc-names-v1 |
7d63398fbfd1
branchmap: use revbranchcache when updating branch map
Mads Kiilerich <madski@unity3d.com>
parents:
23512
diff
changeset
|
97 |
.hg/cache/rbc-revs-v1 |
11865
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
98 |
.hg/data |
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
99 |
.hg/data/tst.d.hg |
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
100 |
.hg/data/tst.d.hg/foo.i |
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
101 |
.hg/dirstate |
33427
1bdafe1111ce
tests: add extra output for fsmonitor at checking under .hg
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
27192
diff
changeset
|
102 |
.hg/fsmonitor.state (fsmonitor !) |
11865
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
103 |
.hg/last-message.txt |
15483
9ae766f2f452
phases: set new commit in 1-phase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
15455
diff
changeset
|
104 |
.hg/phaseroots |
11865
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
105 |
.hg/requires |
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
106 |
.hg/undo |
50465
63dc24be635d
transaction: use a ".bck" extension for all backup file
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
50195
diff
changeset
|
107 |
.hg/undo.backup.branch.bck |
23904
d251da5e0e84
transaction: include backup file in the "undo" transaction
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
23786
diff
changeset
|
108 |
.hg/undo.backupfiles |
11865
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
109 |
.hg/undo.desc |
40792
47e3f554df35
check-exec: write file in 'wcache' instead of 'cache'
Boris Feld <boris.feld@octobus.net>
parents:
40674
diff
changeset
|
110 |
.hg/wcache |
40807
f6d37e84d8f9
tests: stabilize for recent wcache changes
Matt Harbison <matt_harbison@yahoo.com>
parents:
40792
diff
changeset
|
111 |
.hg/wcache/checkisexec (execbit !) |
f6d37e84d8f9
tests: stabilize for recent wcache changes
Matt Harbison <matt_harbison@yahoo.com>
parents:
40792
diff
changeset
|
112 |
.hg/wcache/checklink (symlink !) |
f6d37e84d8f9
tests: stabilize for recent wcache changes
Matt Harbison <matt_harbison@yahoo.com>
parents:
40792
diff
changeset
|
113 |
.hg/wcache/checklink-target (symlink !) |
41965
e4ac7e63c213
manifestcache: use `wcache` directory for manifest cache
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
40807
diff
changeset
|
114 |
.hg/wcache/manifestfulltextcache (reporevlogstore !) |
11865
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
115 |
$ cd .. |
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
116 |
|
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
117 |
Non fncache repo: |
8633
c31fe74a6633
store encoding: .i/.d encoding for non-store repo (broken by 810387f59696)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8167
diff
changeset
|
118 |
|
11865
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
119 |
$ hg --config format.usefncache=False init bar |
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
120 |
$ cd bar |
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
121 |
$ mkdir tst.d |
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
122 |
$ echo foo > tst.d/Foo |
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
123 |
$ hg ci -Amfoo |
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
124 |
adding tst.d/Foo |
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
125 |
$ find .hg | sort |
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
126 |
.hg |
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
127 |
.hg/00changelog.i |
50195
11e6eee4b063
transaction: use the standard transaction mechanism to backup branch
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
50194
diff
changeset
|
128 |
.hg/branch |
15886
a5917346c72e
localrepo: update branchcache in a more reliable way
Mads Kiilerich <mads@kiilerich.com>
parents:
15483
diff
changeset
|
129 |
.hg/cache |
20185
7d4219512823
branchmap: cache open/closed branch head information
Brodie Rao <brodie@sf.io>
parents:
18382
diff
changeset
|
130 |
.hg/cache/branch2-served |
23786
7d63398fbfd1
branchmap: use revbranchcache when updating branch map
Mads Kiilerich <madski@unity3d.com>
parents:
23512
diff
changeset
|
131 |
.hg/cache/rbc-names-v1 |
7d63398fbfd1
branchmap: use revbranchcache when updating branch map
Mads Kiilerich <madski@unity3d.com>
parents:
23512
diff
changeset
|
132 |
.hg/cache/rbc-revs-v1 |
11865
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
133 |
.hg/dirstate |
33427
1bdafe1111ce
tests: add extra output for fsmonitor at checking under .hg
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
27192
diff
changeset
|
134 |
.hg/fsmonitor.state (fsmonitor !) |
11865
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
135 |
.hg/last-message.txt |
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
136 |
.hg/requires |
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
137 |
.hg/store |
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
138 |
.hg/store/00changelog.i |
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
139 |
.hg/store/00manifest.i |
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
140 |
.hg/store/data |
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
141 |
.hg/store/data/tst.d.hg |
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
142 |
.hg/store/data/tst.d.hg/_foo.i |
15483
9ae766f2f452
phases: set new commit in 1-phase
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
15455
diff
changeset
|
143 |
.hg/store/phaseroots |
48669
7ee07e1a25c0
share-safe: enable by default (BC)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
47447
diff
changeset
|
144 |
.hg/store/requires |
11865
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
145 |
.hg/store/undo |
23904
d251da5e0e84
transaction: include backup file in the "undo" transaction
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
23786
diff
changeset
|
146 |
.hg/store/undo.backupfiles |
50465
63dc24be635d
transaction: use a ".bck" extension for all backup file
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
50195
diff
changeset
|
147 |
.hg/undo.backup.branch.bck |
11865
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
148 |
.hg/undo.desc |
40792
47e3f554df35
check-exec: write file in 'wcache' instead of 'cache'
Boris Feld <boris.feld@octobus.net>
parents:
40674
diff
changeset
|
149 |
.hg/wcache |
40807
f6d37e84d8f9
tests: stabilize for recent wcache changes
Matt Harbison <matt_harbison@yahoo.com>
parents:
40792
diff
changeset
|
150 |
.hg/wcache/checkisexec (execbit !) |
f6d37e84d8f9
tests: stabilize for recent wcache changes
Matt Harbison <matt_harbison@yahoo.com>
parents:
40792
diff
changeset
|
151 |
.hg/wcache/checklink (symlink !) |
f6d37e84d8f9
tests: stabilize for recent wcache changes
Matt Harbison <matt_harbison@yahoo.com>
parents:
40792
diff
changeset
|
152 |
.hg/wcache/checklink-target (symlink !) |
41965
e4ac7e63c213
manifestcache: use `wcache` directory for manifest cache
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
40807
diff
changeset
|
153 |
.hg/wcache/manifestfulltextcache (reporevlogstore !) |
11865
400aa8f28f6b
tests: unify test-fncache
Adrian Buehlmann <adrian@cadifra.com>
parents:
8721
diff
changeset
|
154 |
$ cd .. |
8633
c31fe74a6633
store encoding: .i/.d encoding for non-store repo (broken by 810387f59696)
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
8167
diff
changeset
|
155 |
|
17710
95d29533e2ee
test-fncache: test reserved / long paths
Adrian Buehlmann <adrian@cadifra.com>
parents:
15886
diff
changeset
|
156 |
Encoding of reserved / long paths in the store |
95d29533e2ee
test-fncache: test reserved / long paths
Adrian Buehlmann <adrian@cadifra.com>
parents:
15886
diff
changeset
|
157 |
|
95d29533e2ee
test-fncache: test reserved / long paths
Adrian Buehlmann <adrian@cadifra.com>
parents:
15886
diff
changeset
|
158 |
$ hg init r2 |
95d29533e2ee
test-fncache: test reserved / long paths
Adrian Buehlmann <adrian@cadifra.com>
parents:
15886
diff
changeset
|
159 |
$ cd r2 |
95d29533e2ee
test-fncache: test reserved / long paths
Adrian Buehlmann <adrian@cadifra.com>
parents:
15886
diff
changeset
|
160 |
$ cat <<EOF > .hg/hgrc |
95d29533e2ee
test-fncache: test reserved / long paths
Adrian Buehlmann <adrian@cadifra.com>
parents:
15886
diff
changeset
|
161 |
> [ui] |
95d29533e2ee
test-fncache: test reserved / long paths
Adrian Buehlmann <adrian@cadifra.com>
parents:
15886
diff
changeset
|
162 |
> portablefilenames = ignore |
95d29533e2ee
test-fncache: test reserved / long paths
Adrian Buehlmann <adrian@cadifra.com>
parents:
15886
diff
changeset
|
163 |
> EOF |
95d29533e2ee
test-fncache: test reserved / long paths
Adrian Buehlmann <adrian@cadifra.com>
parents:
15886
diff
changeset
|
164 |
|
17748
49f759636aaf
test-fncache: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
17710
diff
changeset
|
165 |
$ hg import -q --bypass - <<EOF |
49f759636aaf
test-fncache: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
17710
diff
changeset
|
166 |
> # HG changeset patch |
49f759636aaf
test-fncache: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
17710
diff
changeset
|
167 |
> # User test |
49f759636aaf
test-fncache: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
17710
diff
changeset
|
168 |
> # Date 0 0 |
49f759636aaf
test-fncache: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
17710
diff
changeset
|
169 |
> # Node ID 1c7a2f7cb77be1a0def34e4c7cabc562ad98fbd7 |
49f759636aaf
test-fncache: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
17710
diff
changeset
|
170 |
> # Parent 0000000000000000000000000000000000000000 |
49f759636aaf
test-fncache: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
17710
diff
changeset
|
171 |
> 1 |
49f759636aaf
test-fncache: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
17710
diff
changeset
|
172 |
> |
49f759636aaf
test-fncache: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
17710
diff
changeset
|
173 |
> diff --git a/12345678/12345678/12345678/12345678/12345678/12345678/12345678/12345/xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-12.3456789-12345-ABCDEFGHIJKLMNOPRSTUVWXYZ-abcdefghjiklmnopqrstuvwxyz b/12345678/12345678/12345678/12345678/12345678/12345678/12345678/12345/xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-12.3456789-12345-ABCDEFGHIJKLMNOPRSTUVWXYZ-abcdefghjiklmnopqrstuvwxyz |
49f759636aaf
test-fncache: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
17710
diff
changeset
|
174 |
> new file mode 100644 |
49f759636aaf
test-fncache: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
17710
diff
changeset
|
175 |
> --- /dev/null |
49f759636aaf
test-fncache: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
17710
diff
changeset
|
176 |
> +++ b/12345678/12345678/12345678/12345678/12345678/12345678/12345678/12345/xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-12.3456789-12345-ABCDEFGHIJKLMNOPRSTUVWXYZ-abcdefghjiklmnopqrstuvwxyz |
49f759636aaf
test-fncache: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
17710
diff
changeset
|
177 |
> @@ -0,0 +1,1 @@ |
49f759636aaf
test-fncache: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
17710
diff
changeset
|
178 |
> +foo |
49f759636aaf
test-fncache: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
17710
diff
changeset
|
179 |
> diff --git a/AUX/SECOND/X.PRN/FOURTH/FI:FTH/SIXTH/SEVENTH/EIGHTH/NINETH/TENTH/ELEVENTH/LOREMIPSUM.TXT b/AUX/SECOND/X.PRN/FOURTH/FI:FTH/SIXTH/SEVENTH/EIGHTH/NINETH/TENTH/ELEVENTH/LOREMIPSUM.TXT |
49f759636aaf
test-fncache: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
17710
diff
changeset
|
180 |
> new file mode 100644 |
49f759636aaf
test-fncache: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
17710
diff
changeset
|
181 |
> --- /dev/null |
49f759636aaf
test-fncache: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
17710
diff
changeset
|
182 |
> +++ b/AUX/SECOND/X.PRN/FOURTH/FI:FTH/SIXTH/SEVENTH/EIGHTH/NINETH/TENTH/ELEVENTH/LOREMIPSUM.TXT |
49f759636aaf
test-fncache: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
17710
diff
changeset
|
183 |
> @@ -0,0 +1,1 @@ |
49f759636aaf
test-fncache: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
17710
diff
changeset
|
184 |
> +foo |
49f759636aaf
test-fncache: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
17710
diff
changeset
|
185 |
> diff --git a/Project Planning/Resources/AnotherLongDirectoryName/Followedbyanother/AndAnother/AndThenAnExtremelyLongFileName.txt b/Project Planning/Resources/AnotherLongDirectoryName/Followedbyanother/AndAnother/AndThenAnExtremelyLongFileName.txt |
49f759636aaf
test-fncache: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
17710
diff
changeset
|
186 |
> new file mode 100644 |
49f759636aaf
test-fncache: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
17710
diff
changeset
|
187 |
> --- /dev/null |
49f759636aaf
test-fncache: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
17710
diff
changeset
|
188 |
> +++ b/Project Planning/Resources/AnotherLongDirectoryName/Followedbyanother/AndAnother/AndThenAnExtremelyLongFileName.txt |
49f759636aaf
test-fncache: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
17710
diff
changeset
|
189 |
> @@ -0,0 +1,1 @@ |
49f759636aaf
test-fncache: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
17710
diff
changeset
|
190 |
> +foo |
49f759636aaf
test-fncache: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
17710
diff
changeset
|
191 |
> diff --git a/bla.aux/prn/PRN/lpt/com3/nul/coma/foo.NUL/normal.c b/bla.aux/prn/PRN/lpt/com3/nul/coma/foo.NUL/normal.c |
49f759636aaf
test-fncache: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
17710
diff
changeset
|
192 |
> new file mode 100644 |
49f759636aaf
test-fncache: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
17710
diff
changeset
|
193 |
> --- /dev/null |
49f759636aaf
test-fncache: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
17710
diff
changeset
|
194 |
> +++ b/bla.aux/prn/PRN/lpt/com3/nul/coma/foo.NUL/normal.c |
49f759636aaf
test-fncache: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
17710
diff
changeset
|
195 |
> @@ -0,0 +1,1 @@ |
49f759636aaf
test-fncache: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
17710
diff
changeset
|
196 |
> +foo |
49f759636aaf
test-fncache: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
17710
diff
changeset
|
197 |
> diff --git a/enterprise/openesbaddons/contrib-imola/corba-bc/netbeansplugin/wsdlExtension/src/main/java/META-INF/services/org.netbeans.modules.xml.wsdl.bindingsupport.spi.ExtensibilityElementTemplateProvider b/enterprise/openesbaddons/contrib-imola/corba-bc/netbeansplugin/wsdlExtension/src/main/java/META-INF/services/org.netbeans.modules.xml.wsdl.bindingsupport.spi.ExtensibilityElementTemplateProvider |
49f759636aaf
test-fncache: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
17710
diff
changeset
|
198 |
> new file mode 100644 |
49f759636aaf
test-fncache: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
17710
diff
changeset
|
199 |
> --- /dev/null |
49f759636aaf
test-fncache: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
17710
diff
changeset
|
200 |
> +++ b/enterprise/openesbaddons/contrib-imola/corba-bc/netbeansplugin/wsdlExtension/src/main/java/META-INF/services/org.netbeans.modules.xml.wsdl.bindingsupport.spi.ExtensibilityElementTemplateProvider |
49f759636aaf
test-fncache: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
17710
diff
changeset
|
201 |
> @@ -0,0 +1,1 @@ |
49f759636aaf
test-fncache: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
17710
diff
changeset
|
202 |
> +foo |
49f759636aaf
test-fncache: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
17710
diff
changeset
|
203 |
> EOF |
49f759636aaf
test-fncache: enable for Windows
Adrian Buehlmann <adrian@cadifra.com>
parents:
17710
diff
changeset
|
204 |
|
17710
95d29533e2ee
test-fncache: test reserved / long paths
Adrian Buehlmann <adrian@cadifra.com>
parents:
15886
diff
changeset
|
205 |
$ find .hg/store -name *.i | sort |
95d29533e2ee
test-fncache: test reserved / long paths
Adrian Buehlmann <adrian@cadifra.com>
parents:
15886
diff
changeset
|
206 |
.hg/store/00changelog.i |
95d29533e2ee
test-fncache: test reserved / long paths
Adrian Buehlmann <adrian@cadifra.com>
parents:
15886
diff
changeset
|
207 |
.hg/store/00manifest.i |
95d29533e2ee
test-fncache: test reserved / long paths
Adrian Buehlmann <adrian@cadifra.com>
parents:
15886
diff
changeset
|
208 |
.hg/store/data/bla.aux/pr~6e/_p_r_n/lpt/co~6d3/nu~6c/coma/foo._n_u_l/normal.c.i |
95d29533e2ee
test-fncache: test reserved / long paths
Adrian Buehlmann <adrian@cadifra.com>
parents:
15886
diff
changeset
|
209 |
.hg/store/dh/12345678/12345678/12345678/12345678/12345678/12345678/12345678/12345/xxxxxx168e07b38e65eff86ab579afaaa8e30bfbe0f35f.i |
95d29533e2ee
test-fncache: test reserved / long paths
Adrian Buehlmann <adrian@cadifra.com>
parents:
15886
diff
changeset
|
210 |
.hg/store/dh/au~78/second/x.prn/fourth/fi~3afth/sixth/seventh/eighth/nineth/tenth/loremia20419e358ddff1bf8751e38288aff1d7c32ec05.i |
95d29533e2ee
test-fncache: test reserved / long paths
Adrian Buehlmann <adrian@cadifra.com>
parents:
15886
diff
changeset
|
211 |
.hg/store/dh/enterpri/openesba/contrib-/corba-bc/netbeans/wsdlexte/src/main/java/org.net7018f27961fdf338a598a40c4683429e7ffb9743.i |
95d29533e2ee
test-fncache: test reserved / long paths
Adrian Buehlmann <adrian@cadifra.com>
parents:
15886
diff
changeset
|
212 |
.hg/store/dh/project_/resource/anotherl/followed/andanoth/andthenanextremelylongfilename0d8e1f4187c650e2f1fdca9fd90f786bc0976b6b.i |
95d29533e2ee
test-fncache: test reserved / long paths
Adrian Buehlmann <adrian@cadifra.com>
parents:
15886
diff
changeset
|
213 |
|
95d29533e2ee
test-fncache: test reserved / long paths
Adrian Buehlmann <adrian@cadifra.com>
parents:
15886
diff
changeset
|
214 |
$ cd .. |
95d29533e2ee
test-fncache: test reserved / long paths
Adrian Buehlmann <adrian@cadifra.com>
parents:
15886
diff
changeset
|
215 |
|
20883
cd443c7589cc
fncache: move fncache writing to be in a transaction
Durham Goode <durham@fb.com>
parents:
20185
diff
changeset
|
216 |
Aborting lock does not prevent fncache writes |
17710
95d29533e2ee
test-fncache: test reserved / long paths
Adrian Buehlmann <adrian@cadifra.com>
parents:
15886
diff
changeset
|
217 |
|
20883
cd443c7589cc
fncache: move fncache writing to be in a transaction
Durham Goode <durham@fb.com>
parents:
20185
diff
changeset
|
218 |
$ cat > exceptionext.py <<EOF |
cd443c7589cc
fncache: move fncache writing to be in a transaction
Durham Goode <durham@fb.com>
parents:
20185
diff
changeset
|
219 |
> import os |
33956
1be228b96030
tests: update test-fncache to pass our import checker
Augie Fackler <raf@durin42.com>
parents:
33607
diff
changeset
|
220 |
> from mercurial import commands, error, extensions |
20883
cd443c7589cc
fncache: move fncache writing to be in a transaction
Durham Goode <durham@fb.com>
parents:
20185
diff
changeset
|
221 |
> |
26497
ca778cbe94f3
test-fncache: use args/kwargs for lock wrapper
Siddharth Agarwal <sid0@fb.com>
parents:
26475
diff
changeset
|
222 |
> def lockexception(orig, vfs, lockname, wait, releasefn, *args, **kwargs): |
20883
cd443c7589cc
fncache: move fncache writing to be in a transaction
Durham Goode <durham@fb.com>
parents:
20185
diff
changeset
|
223 |
> def releasewrap(): |
27168
8a829fc84bb3
test-fncache: ensure lock doesn't look held to __del__
Augie Fackler <augie@google.com>
parents:
26998
diff
changeset
|
224 |
> l.held = False # ensure __del__ is a noop |
45681
a736ab681b78
errors: stop passing non-strings to Abort's constructor
Martin von Zweigbergk <martinvonz@google.com>
parents:
44355
diff
changeset
|
225 |
> raise error.Abort(b"forced lock failure") |
27168
8a829fc84bb3
test-fncache: ensure lock doesn't look held to __del__
Augie Fackler <augie@google.com>
parents:
26998
diff
changeset
|
226 |
> l = orig(vfs, lockname, wait, releasewrap, *args, **kwargs) |
8a829fc84bb3
test-fncache: ensure lock doesn't look held to __del__
Augie Fackler <augie@google.com>
parents:
26998
diff
changeset
|
227 |
> return l |
20883
cd443c7589cc
fncache: move fncache writing to be in a transaction
Durham Goode <durham@fb.com>
parents:
20185
diff
changeset
|
228 |
> |
cd443c7589cc
fncache: move fncache writing to be in a transaction
Durham Goode <durham@fb.com>
parents:
20185
diff
changeset
|
229 |
> def reposetup(ui, repo): |
33956
1be228b96030
tests: update test-fncache to pass our import checker
Augie Fackler <raf@durin42.com>
parents:
33607
diff
changeset
|
230 |
> extensions.wrapfunction(repo, '_lock', lockexception) |
20883
cd443c7589cc
fncache: move fncache writing to be in a transaction
Durham Goode <durham@fb.com>
parents:
20185
diff
changeset
|
231 |
> |
cd443c7589cc
fncache: move fncache writing to be in a transaction
Durham Goode <durham@fb.com>
parents:
20185
diff
changeset
|
232 |
> cmdtable = {} |
cd443c7589cc
fncache: move fncache writing to be in a transaction
Durham Goode <durham@fb.com>
parents:
20185
diff
changeset
|
233 |
> |
27192
a01d3d32b53a
commands: make commit acquire locks before processing (issue4368)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
27168
diff
changeset
|
234 |
> # wrap "commit" command to prevent wlock from being '__del__()'-ed |
a01d3d32b53a
commands: make commit acquire locks before processing (issue4368)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
27168
diff
changeset
|
235 |
> # at the end of dispatching (for intentional "forced lcok failure") |
a01d3d32b53a
commands: make commit acquire locks before processing (issue4368)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
27168
diff
changeset
|
236 |
> def commitwrap(orig, ui, repo, *pats, **opts): |
a01d3d32b53a
commands: make commit acquire locks before processing (issue4368)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
27168
diff
changeset
|
237 |
> repo = repo.unfiltered() # to use replaced repo._lock certainly |
a01d3d32b53a
commands: make commit acquire locks before processing (issue4368)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
27168
diff
changeset
|
238 |
> wlock = repo.wlock() |
a01d3d32b53a
commands: make commit acquire locks before processing (issue4368)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
27168
diff
changeset
|
239 |
> try: |
a01d3d32b53a
commands: make commit acquire locks before processing (issue4368)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
27168
diff
changeset
|
240 |
> return orig(ui, repo, *pats, **opts) |
a01d3d32b53a
commands: make commit acquire locks before processing (issue4368)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
27168
diff
changeset
|
241 |
> finally: |
a01d3d32b53a
commands: make commit acquire locks before processing (issue4368)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
27168
diff
changeset
|
242 |
> # multiple 'relase()' is needed for complete releasing wlock, |
a01d3d32b53a
commands: make commit acquire locks before processing (issue4368)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
27168
diff
changeset
|
243 |
> # because "forced" abort at last releasing store lock |
a01d3d32b53a
commands: make commit acquire locks before processing (issue4368)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
27168
diff
changeset
|
244 |
> # prevents wlock from being released at same 'lockmod.release()' |
a01d3d32b53a
commands: make commit acquire locks before processing (issue4368)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
27168
diff
changeset
|
245 |
> for i in range(wlock.held): |
a01d3d32b53a
commands: make commit acquire locks before processing (issue4368)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
27168
diff
changeset
|
246 |
> wlock.release() |
a01d3d32b53a
commands: make commit acquire locks before processing (issue4368)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
27168
diff
changeset
|
247 |
> |
a01d3d32b53a
commands: make commit acquire locks before processing (issue4368)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents:
27168
diff
changeset
|
248 |
> def extsetup(ui): |
36493
5b5cc44b2cdc
py3: add a b'' prefix in tests/test-fncache.t
Pulkit Goyal <7895pulkit@gmail.com>
parents:
35393
diff
changeset
|
249 |
> extensions.wrapcommand(commands.table, b"commit", commitwrap) |
20883
cd443c7589cc
fncache: move fncache writing to be in a transaction
Durham Goode <durham@fb.com>
parents:
20185
diff
changeset
|
250 |
> EOF |
cd443c7589cc
fncache: move fncache writing to be in a transaction
Durham Goode <durham@fb.com>
parents:
20185
diff
changeset
|
251 |
$ extpath=`pwd`/exceptionext.py |
cd443c7589cc
fncache: move fncache writing to be in a transaction
Durham Goode <durham@fb.com>
parents:
20185
diff
changeset
|
252 |
$ hg init fncachetxn |
cd443c7589cc
fncache: move fncache writing to be in a transaction
Durham Goode <durham@fb.com>
parents:
20185
diff
changeset
|
253 |
$ cd fncachetxn |
cd443c7589cc
fncache: move fncache writing to be in a transaction
Durham Goode <durham@fb.com>
parents:
20185
diff
changeset
|
254 |
$ printf "[extensions]\nexceptionext=$extpath\n" >> .hg/hgrc |
cd443c7589cc
fncache: move fncache writing to be in a transaction
Durham Goode <durham@fb.com>
parents:
20185
diff
changeset
|
255 |
$ touch y |
cd443c7589cc
fncache: move fncache writing to be in a transaction
Durham Goode <durham@fb.com>
parents:
20185
diff
changeset
|
256 |
$ hg ci -qAm y |
cd443c7589cc
fncache: move fncache writing to be in a transaction
Durham Goode <durham@fb.com>
parents:
20185
diff
changeset
|
257 |
abort: forced lock failure |
cd443c7589cc
fncache: move fncache writing to be in a transaction
Durham Goode <durham@fb.com>
parents:
20185
diff
changeset
|
258 |
[255] |
cd443c7589cc
fncache: move fncache writing to be in a transaction
Durham Goode <durham@fb.com>
parents:
20185
diff
changeset
|
259 |
$ cat .hg/store/fncache |
cd443c7589cc
fncache: move fncache writing to be in a transaction
Durham Goode <durham@fb.com>
parents:
20185
diff
changeset
|
260 |
data/y.i |
cd443c7589cc
fncache: move fncache writing to be in a transaction
Durham Goode <durham@fb.com>
parents:
20185
diff
changeset
|
261 |
|
cd443c7589cc
fncache: move fncache writing to be in a transaction
Durham Goode <durham@fb.com>
parents:
20185
diff
changeset
|
262 |
Aborting transaction prevents fncache change |
cd443c7589cc
fncache: move fncache writing to be in a transaction
Durham Goode <durham@fb.com>
parents:
20185
diff
changeset
|
263 |
|
cd443c7589cc
fncache: move fncache writing to be in a transaction
Durham Goode <durham@fb.com>
parents:
20185
diff
changeset
|
264 |
$ cat > ../exceptionext.py <<EOF |
cd443c7589cc
fncache: move fncache writing to be in a transaction
Durham Goode <durham@fb.com>
parents:
20185
diff
changeset
|
265 |
> import os |
33956
1be228b96030
tests: update test-fncache to pass our import checker
Augie Fackler <raf@durin42.com>
parents:
33607
diff
changeset
|
266 |
> from mercurial import commands, error, extensions, localrepo |
20883
cd443c7589cc
fncache: move fncache writing to be in a transaction
Durham Goode <durham@fb.com>
parents:
20185
diff
changeset
|
267 |
> |
cd443c7589cc
fncache: move fncache writing to be in a transaction
Durham Goode <durham@fb.com>
parents:
20185
diff
changeset
|
268 |
> def wrapper(orig, self, *args, **kwargs): |
23510
065c0334846f
fncache: drop dedicated 'onclose' function in favor of 'tr.addfinalize'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
23063
diff
changeset
|
269 |
> tr = orig(self, *args, **kwargs) |
065c0334846f
fncache: drop dedicated 'onclose' function in favor of 'tr.addfinalize'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
23063
diff
changeset
|
270 |
> def fail(tr): |
36662
3715a5ffcf92
tests: fix bytes literals in test-fncache.t
Augie Fackler <augie@google.com>
parents:
36493
diff
changeset
|
271 |
> raise error.Abort(b"forced transaction failure") |
23510
065c0334846f
fncache: drop dedicated 'onclose' function in favor of 'tr.addfinalize'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
23063
diff
changeset
|
272 |
> # zzz prefix to ensure it sorted after store.write |
36662
3715a5ffcf92
tests: fix bytes literals in test-fncache.t
Augie Fackler <augie@google.com>
parents:
36493
diff
changeset
|
273 |
> tr.addfinalize(b'zzz-forcefails', fail) |
23510
065c0334846f
fncache: drop dedicated 'onclose' function in favor of 'tr.addfinalize'
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
23063
diff
changeset
|
274 |
> return tr |
20883
cd443c7589cc
fncache: move fncache writing to be in a transaction
Durham Goode <durham@fb.com>
parents:
20185
diff
changeset
|
275 |
> |
cd443c7589cc
fncache: move fncache writing to be in a transaction
Durham Goode <durham@fb.com>
parents:
20185
diff
changeset
|
276 |
> def uisetup(ui): |
33956
1be228b96030
tests: update test-fncache to pass our import checker
Augie Fackler <raf@durin42.com>
parents:
33607
diff
changeset
|
277 |
> extensions.wrapfunction( |
50799
02eae2df911a
wrapfunction: use sysstr instead of bytes as argument in various tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
50673
diff
changeset
|
278 |
> localrepo.localrepository, 'transaction', wrapper) |
20883
cd443c7589cc
fncache: move fncache writing to be in a transaction
Durham Goode <durham@fb.com>
parents:
20185
diff
changeset
|
279 |
> |
cd443c7589cc
fncache: move fncache writing to be in a transaction
Durham Goode <durham@fb.com>
parents:
20185
diff
changeset
|
280 |
> cmdtable = {} |
cd443c7589cc
fncache: move fncache writing to be in a transaction
Durham Goode <durham@fb.com>
parents:
20185
diff
changeset
|
281 |
> |
cd443c7589cc
fncache: move fncache writing to be in a transaction
Durham Goode <durham@fb.com>
parents:
20185
diff
changeset
|
282 |
> EOF |
33607
6c142f279625
pypy: fix failing test files with Pypy5.6.0
Boris Feld <boris.feld@octobus.net>
parents:
33427
diff
changeset
|
283 |
|
6c142f279625
pypy: fix failing test files with Pypy5.6.0
Boris Feld <boris.feld@octobus.net>
parents:
33427
diff
changeset
|
284 |
Clean cached version |
21760
a7f5967ff644
tests: ignore missing file with PYTHONDONTWRITEBYTECODE (issue4239)
Matt Mackall <mpm@selenic.com>
parents:
20883
diff
changeset
|
285 |
$ rm -f "${extpath}c" |
33607
6c142f279625
pypy: fix failing test files with Pypy5.6.0
Boris Feld <boris.feld@octobus.net>
parents:
33427
diff
changeset
|
286 |
$ rm -Rf "`dirname $extpath`/__pycache__" |
6c142f279625
pypy: fix failing test files with Pypy5.6.0
Boris Feld <boris.feld@octobus.net>
parents:
33427
diff
changeset
|
287 |
|
20883
cd443c7589cc
fncache: move fncache writing to be in a transaction
Durham Goode <durham@fb.com>
parents:
20185
diff
changeset
|
288 |
$ touch z |
cd443c7589cc
fncache: move fncache writing to be in a transaction
Durham Goode <durham@fb.com>
parents:
20185
diff
changeset
|
289 |
$ hg ci -qAm z |
cd443c7589cc
fncache: move fncache writing to be in a transaction
Durham Goode <durham@fb.com>
parents:
20185
diff
changeset
|
290 |
transaction abort! |
cd443c7589cc
fncache: move fncache writing to be in a transaction
Durham Goode <durham@fb.com>
parents:
20185
diff
changeset
|
291 |
rollback completed |
cd443c7589cc
fncache: move fncache writing to be in a transaction
Durham Goode <durham@fb.com>
parents:
20185
diff
changeset
|
292 |
abort: forced transaction failure |
cd443c7589cc
fncache: move fncache writing to be in a transaction
Durham Goode <durham@fb.com>
parents:
20185
diff
changeset
|
293 |
[255] |
cd443c7589cc
fncache: move fncache writing to be in a transaction
Durham Goode <durham@fb.com>
parents:
20185
diff
changeset
|
294 |
$ cat .hg/store/fncache |
cd443c7589cc
fncache: move fncache writing to be in a transaction
Durham Goode <durham@fb.com>
parents:
20185
diff
changeset
|
295 |
data/y.i |
23063
cd86a6707159
transactions: fix hg recover with fncache backups
Durham Goode <durham@fb.com>
parents:
21760
diff
changeset
|
296 |
|
cd86a6707159
transactions: fix hg recover with fncache backups
Durham Goode <durham@fb.com>
parents:
21760
diff
changeset
|
297 |
Aborted transactions can be recovered later |
cd86a6707159
transactions: fix hg recover with fncache backups
Durham Goode <durham@fb.com>
parents:
21760
diff
changeset
|
298 |
|
cd86a6707159
transactions: fix hg recover with fncache backups
Durham Goode <durham@fb.com>
parents:
21760
diff
changeset
|
299 |
$ cat > ../exceptionext.py <<EOF |
cd86a6707159
transactions: fix hg recover with fncache backups
Durham Goode <durham@fb.com>
parents:
21760
diff
changeset
|
300 |
> import os |
49992
420fad6bdec5
test: use a more direct form of interruption in fncache "recover" testing
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49826
diff
changeset
|
301 |
> import signal |
33956
1be228b96030
tests: update test-fncache to pass our import checker
Augie Fackler <raf@durin42.com>
parents:
33607
diff
changeset
|
302 |
> from mercurial import ( |
1be228b96030
tests: update test-fncache to pass our import checker
Augie Fackler <raf@durin42.com>
parents:
33607
diff
changeset
|
303 |
> commands, |
1be228b96030
tests: update test-fncache to pass our import checker
Augie Fackler <raf@durin42.com>
parents:
33607
diff
changeset
|
304 |
> error, |
1be228b96030
tests: update test-fncache to pass our import checker
Augie Fackler <raf@durin42.com>
parents:
33607
diff
changeset
|
305 |
> extensions, |
1be228b96030
tests: update test-fncache to pass our import checker
Augie Fackler <raf@durin42.com>
parents:
33607
diff
changeset
|
306 |
> localrepo, |
1be228b96030
tests: update test-fncache to pass our import checker
Augie Fackler <raf@durin42.com>
parents:
33607
diff
changeset
|
307 |
> transaction, |
1be228b96030
tests: update test-fncache to pass our import checker
Augie Fackler <raf@durin42.com>
parents:
33607
diff
changeset
|
308 |
> ) |
23063
cd86a6707159
transactions: fix hg recover with fncache backups
Durham Goode <durham@fb.com>
parents:
21760
diff
changeset
|
309 |
> |
23512
0ff6b65afeb0
transaction: remove the redundant 'onclose' mechanism
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
23510
diff
changeset
|
310 |
> def trwrapper(orig, self, *args, **kwargs): |
0ff6b65afeb0
transaction: remove the redundant 'onclose' mechanism
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
23510
diff
changeset
|
311 |
> tr = orig(self, *args, **kwargs) |
0ff6b65afeb0
transaction: remove the redundant 'onclose' mechanism
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
23510
diff
changeset
|
312 |
> def fail(tr): |
49992
420fad6bdec5
test: use a more direct form of interruption in fncache "recover" testing
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49826
diff
changeset
|
313 |
> os.kill(os.getpid(), signal.SIGKILL) |
23512
0ff6b65afeb0
transaction: remove the redundant 'onclose' mechanism
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
23510
diff
changeset
|
314 |
> # zzz prefix to ensure it sorted after store.write |
40262
c8f164061212
tests: fix inline extension in test-fncache.t for Python 3
Augie Fackler <augie@google.com>
parents:
39698
diff
changeset
|
315 |
> tr.addfinalize(b'zzz-forcefails', fail) |
23512
0ff6b65afeb0
transaction: remove the redundant 'onclose' mechanism
Pierre-Yves David <pierre-yves.david@fb.com>
parents:
23510
diff
changeset
|
316 |
> return tr |
23063
cd86a6707159
transactions: fix hg recover with fncache backups
Durham Goode <durham@fb.com>
parents:
21760
diff
changeset
|
317 |
> |
cd86a6707159
transactions: fix hg recover with fncache backups
Durham Goode <durham@fb.com>
parents:
21760
diff
changeset
|
318 |
> def uisetup(ui): |
33956
1be228b96030
tests: update test-fncache to pass our import checker
Augie Fackler <raf@durin42.com>
parents:
33607
diff
changeset
|
319 |
> extensions.wrapfunction(localrepo.localrepository, 'transaction', |
1be228b96030
tests: update test-fncache to pass our import checker
Augie Fackler <raf@durin42.com>
parents:
33607
diff
changeset
|
320 |
> trwrapper) |
23063
cd86a6707159
transactions: fix hg recover with fncache backups
Durham Goode <durham@fb.com>
parents:
21760
diff
changeset
|
321 |
> |
cd86a6707159
transactions: fix hg recover with fncache backups
Durham Goode <durham@fb.com>
parents:
21760
diff
changeset
|
322 |
> cmdtable = {} |
cd86a6707159
transactions: fix hg recover with fncache backups
Durham Goode <durham@fb.com>
parents:
21760
diff
changeset
|
323 |
> |
cd86a6707159
transactions: fix hg recover with fncache backups
Durham Goode <durham@fb.com>
parents:
21760
diff
changeset
|
324 |
> EOF |
33607
6c142f279625
pypy: fix failing test files with Pypy5.6.0
Boris Feld <boris.feld@octobus.net>
parents:
33427
diff
changeset
|
325 |
|
6c142f279625
pypy: fix failing test files with Pypy5.6.0
Boris Feld <boris.feld@octobus.net>
parents:
33427
diff
changeset
|
326 |
Clean cached versions |
23063
cd86a6707159
transactions: fix hg recover with fncache backups
Durham Goode <durham@fb.com>
parents:
21760
diff
changeset
|
327 |
$ rm -f "${extpath}c" |
33607
6c142f279625
pypy: fix failing test files with Pypy5.6.0
Boris Feld <boris.feld@octobus.net>
parents:
33427
diff
changeset
|
328 |
$ rm -Rf "`dirname $extpath`/__pycache__" |
6c142f279625
pypy: fix failing test files with Pypy5.6.0
Boris Feld <boris.feld@octobus.net>
parents:
33427
diff
changeset
|
329 |
|
23063
cd86a6707159
transactions: fix hg recover with fncache backups
Durham Goode <durham@fb.com>
parents:
21760
diff
changeset
|
330 |
$ hg up -q 1 |
cd86a6707159
transactions: fix hg recover with fncache backups
Durham Goode <durham@fb.com>
parents:
21760
diff
changeset
|
331 |
$ touch z |
49992
420fad6bdec5
test: use a more direct form of interruption in fncache "recover" testing
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49826
diff
changeset
|
332 |
# Cannot rely on the return code value as chg use a different one. |
420fad6bdec5
test: use a more direct form of interruption in fncache "recover" testing
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49826
diff
changeset
|
333 |
# So we use a `|| echo` trick |
420fad6bdec5
test: use a more direct form of interruption in fncache "recover" testing
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49826
diff
changeset
|
334 |
# XXX-CHG fixing chg behavior would be nice here. |
420fad6bdec5
test: use a more direct form of interruption in fncache "recover" testing
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49826
diff
changeset
|
335 |
$ hg ci -qAm z || echo "He's Dead, Jim." 2>/dev/null |
50182
e9d92faa08f8
tests: in test-fncache.t, be more tolerant to the "Killed" message format
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
50029
diff
changeset
|
336 |
*Killed* (glob) (?) |
49992
420fad6bdec5
test: use a more direct form of interruption in fncache "recover" testing
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
49826
diff
changeset
|
337 |
He's Dead, Jim. |
23063
cd86a6707159
transactions: fix hg recover with fncache backups
Durham Goode <durham@fb.com>
parents:
21760
diff
changeset
|
338 |
$ cat .hg/store/fncache | sort |
cd86a6707159
transactions: fix hg recover with fncache backups
Durham Goode <durham@fb.com>
parents:
21760
diff
changeset
|
339 |
data/y.i |
cd86a6707159
transactions: fix hg recover with fncache backups
Durham Goode <durham@fb.com>
parents:
21760
diff
changeset
|
340 |
data/z.i |
44355
7a4e1d245f19
recover: don't verify by default
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
42715
diff
changeset
|
341 |
$ hg recover --verify |
23063
cd86a6707159
transactions: fix hg recover with fncache backups
Durham Goode <durham@fb.com>
parents:
21760
diff
changeset
|
342 |
rolling back interrupted transaction |
cd86a6707159
transactions: fix hg recover with fncache backups
Durham Goode <durham@fb.com>
parents:
21760
diff
changeset
|
343 |
checking changesets |
cd86a6707159
transactions: fix hg recover with fncache backups
Durham Goode <durham@fb.com>
parents:
21760
diff
changeset
|
344 |
checking manifests |
cd86a6707159
transactions: fix hg recover with fncache backups
Durham Goode <durham@fb.com>
parents:
21760
diff
changeset
|
345 |
crosschecking files in changesets and manifests |
cd86a6707159
transactions: fix hg recover with fncache backups
Durham Goode <durham@fb.com>
parents:
21760
diff
changeset
|
346 |
checking files |
49826
c84844cd523a
verify: also check dirstate
Raphaël Gomès <rgomes@octobus.net>
parents:
49825
diff
changeset
|
347 |
checking dirstate |
39489
f1186c292d03
verify: make output less confusing (issue5924)
Meirambek Omyrzak <meirambek77@gmail.com>
parents:
39323
diff
changeset
|
348 |
checked 1 changesets with 1 changes to 1 files |
23063
cd86a6707159
transactions: fix hg recover with fncache backups
Durham Goode <durham@fb.com>
parents:
21760
diff
changeset
|
349 |
$ cat .hg/store/fncache |
cd86a6707159
transactions: fix hg recover with fncache backups
Durham Goode <durham@fb.com>
parents:
21760
diff
changeset
|
350 |
data/y.i |
25652
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
351 |
|
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
352 |
$ cd .. |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
353 |
|
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
354 |
debugrebuildfncache does nothing unless repo has fncache requirement |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
355 |
|
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
356 |
$ hg --config format.usefncache=false init nofncache |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
357 |
$ cd nofncache |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
358 |
$ hg debugrebuildfncache |
25874
3e84f40232c7
repair: fix typo in warning message
Wagner Bruna <wbruna@yahoo.com>
parents:
25653
diff
changeset
|
359 |
(not rebuilding fncache because repository does not support fncache) |
25652
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
360 |
|
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
361 |
$ cd .. |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
362 |
|
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
363 |
debugrebuildfncache works on empty repository |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
364 |
|
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
365 |
$ hg init empty |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
366 |
$ cd empty |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
367 |
$ hg debugrebuildfncache |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
368 |
fncache already up to date |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
369 |
$ cd .. |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
370 |
|
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
371 |
debugrebuildfncache on an up to date repository no-ops |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
372 |
|
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
373 |
$ hg init repo |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
374 |
$ cd repo |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
375 |
$ echo initial > foo |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
376 |
$ echo initial > .bar |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
377 |
$ hg commit -A -m initial |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
378 |
adding .bar |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
379 |
adding foo |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
380 |
|
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
381 |
$ cat .hg/store/fncache | sort |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
382 |
data/.bar.i |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
383 |
data/foo.i |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
384 |
|
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
385 |
$ hg debugrebuildfncache |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
386 |
fncache already up to date |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
387 |
|
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
388 |
debugrebuildfncache restores deleted fncache file |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
389 |
|
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
390 |
$ rm -f .hg/store/fncache |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
391 |
$ hg debugrebuildfncache |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
392 |
adding data/.bar.i |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
393 |
adding data/foo.i |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
394 |
2 items added, 0 removed from fncache |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
395 |
|
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
396 |
$ cat .hg/store/fncache | sort |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
397 |
data/.bar.i |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
398 |
data/foo.i |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
399 |
|
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
400 |
Rebuild after rebuild should no-op |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
401 |
|
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
402 |
$ hg debugrebuildfncache |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
403 |
fncache already up to date |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
404 |
|
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
405 |
A single missing file should get restored, an extra file should be removed |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
406 |
|
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
407 |
$ cat > .hg/store/fncache << EOF |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
408 |
> data/foo.i |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
409 |
> data/bad-entry.i |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
410 |
> EOF |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
411 |
|
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
412 |
$ hg debugrebuildfncache |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
413 |
removing data/bad-entry.i |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
414 |
adding data/.bar.i |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
415 |
1 items added, 1 removed from fncache |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
416 |
|
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
417 |
$ cat .hg/store/fncache | sort |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
418 |
data/.bar.i |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
419 |
data/foo.i |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
420 |
|
42715
f59f8a5e9096
fncache: make debugrebuildfncache not fail on broken fncache
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
42714
diff
changeset
|
421 |
debugrebuildfncache recovers from truncated line in fncache |
42714
6b71334f2540
fncache: show that debugrebuildfncache is partly broken
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
41978
diff
changeset
|
422 |
|
6b71334f2540
fncache: show that debugrebuildfncache is partly broken
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
41978
diff
changeset
|
423 |
$ printf a > .hg/store/fncache |
6b71334f2540
fncache: show that debugrebuildfncache is partly broken
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
41978
diff
changeset
|
424 |
$ hg debugrebuildfncache |
42715
f59f8a5e9096
fncache: make debugrebuildfncache not fail on broken fncache
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
42714
diff
changeset
|
425 |
fncache does not ends with a newline |
f59f8a5e9096
fncache: make debugrebuildfncache not fail on broken fncache
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
42714
diff
changeset
|
426 |
adding data/.bar.i |
f59f8a5e9096
fncache: make debugrebuildfncache not fail on broken fncache
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
42714
diff
changeset
|
427 |
adding data/foo.i |
f59f8a5e9096
fncache: make debugrebuildfncache not fail on broken fncache
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
42714
diff
changeset
|
428 |
2 items added, 0 removed from fncache |
42714
6b71334f2540
fncache: show that debugrebuildfncache is partly broken
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
41978
diff
changeset
|
429 |
|
6b71334f2540
fncache: show that debugrebuildfncache is partly broken
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
41978
diff
changeset
|
430 |
$ cat .hg/store/fncache | sort |
42715
f59f8a5e9096
fncache: make debugrebuildfncache not fail on broken fncache
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
42714
diff
changeset
|
431 |
data/.bar.i |
f59f8a5e9096
fncache: make debugrebuildfncache not fail on broken fncache
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
42714
diff
changeset
|
432 |
data/foo.i |
42714
6b71334f2540
fncache: show that debugrebuildfncache is partly broken
Valentin Gatien-Baron <vgatien-baron@janestreet.com>
parents:
41978
diff
changeset
|
433 |
|
25652
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
434 |
$ cd .. |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
435 |
|
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
436 |
Try a simple variation without dotencode to ensure fncache is ignorant of encoding |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
437 |
|
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
438 |
$ hg --config format.dotencode=false init nodotencode |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
439 |
$ cd nodotencode |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
440 |
$ echo initial > foo |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
441 |
$ echo initial > .bar |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
442 |
$ hg commit -A -m initial |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
443 |
adding .bar |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
444 |
adding foo |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
445 |
|
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
446 |
$ cat .hg/store/fncache | sort |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
447 |
data/.bar.i |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
448 |
data/foo.i |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
449 |
|
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
450 |
$ rm .hg/store/fncache |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
451 |
$ hg debugrebuildfncache |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
452 |
adding data/.bar.i |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
453 |
adding data/foo.i |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
454 |
2 items added, 0 removed from fncache |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
455 |
|
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
456 |
$ cat .hg/store/fncache | sort |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
457 |
data/.bar.i |
2882d6886919
repair: add functionality to rebuild fncache
Gregory Szorc <gregory.szorc@gmail.com>
parents:
25627
diff
changeset
|
458 |
data/foo.i |
38661
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
459 |
|
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
460 |
$ cd .. |
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
461 |
|
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
462 |
In repositories that have accumulated a large number of files over time, the |
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
463 |
fncache file is going to be large. If we possibly can avoid loading it, so much the better. |
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
464 |
The cache should not loaded when committing changes to existing files, or when unbundling |
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
465 |
changesets that only contain changes to existing files: |
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
466 |
|
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
467 |
$ cat > fncacheloadwarn.py << EOF |
39698
f44187605315
localrepo: move store() from store module
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39489
diff
changeset
|
468 |
> from mercurial import extensions, localrepo |
38661
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
469 |
> |
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
470 |
> def extsetup(ui): |
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
471 |
> def wrapstore(orig, requirements, *args): |
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
472 |
> store = orig(requirements, *args) |
40262
c8f164061212
tests: fix inline extension in test-fncache.t for Python 3
Augie Fackler <augie@google.com>
parents:
39698
diff
changeset
|
473 |
> if b'store' in requirements and b'fncache' in requirements: |
38661
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
474 |
> instrumentfncachestore(store, ui) |
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
475 |
> return store |
39698
f44187605315
localrepo: move store() from store module
Gregory Szorc <gregory.szorc@gmail.com>
parents:
39489
diff
changeset
|
476 |
> extensions.wrapfunction(localrepo, 'makestore', wrapstore) |
38661
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
477 |
> |
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
478 |
> def instrumentfncachestore(fncachestore, ui): |
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
479 |
> class instrumentedfncache(type(fncachestore.fncache)): |
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
480 |
> def _load(self): |
40262
c8f164061212
tests: fix inline extension in test-fncache.t for Python 3
Augie Fackler <augie@google.com>
parents:
39698
diff
changeset
|
481 |
> ui.warn(b'fncache load triggered!\n') |
38661
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
482 |
> super(instrumentedfncache, self)._load() |
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
483 |
> fncachestore.fncache.__class__ = instrumentedfncache |
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
484 |
> EOF |
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
485 |
|
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
486 |
$ fncachextpath=`pwd`/fncacheloadwarn.py |
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
487 |
$ hg init nofncacheload |
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
488 |
$ cd nofncacheload |
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
489 |
$ printf "[extensions]\nfncacheloadwarn=$fncachextpath\n" >> .hg/hgrc |
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
490 |
|
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
491 |
A new file should trigger a load, as we'd want to update the fncache set in that case: |
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
492 |
|
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
493 |
$ touch foo |
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
494 |
$ hg ci -qAm foo |
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
495 |
fncache load triggered! |
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
496 |
|
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
497 |
But modifying that file should not: |
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
498 |
|
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
499 |
$ echo bar >> foo |
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
500 |
$ hg ci -qm foo |
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
501 |
|
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
502 |
If a transaction has been aborted, the zero-size truncated index file will |
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
503 |
not prevent the fncache from being loaded; rather than actually abort |
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
504 |
a transaction, we simulate the situation by creating a zero-size index file: |
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
505 |
|
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
506 |
$ touch .hg/store/data/bar.i |
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
507 |
$ touch bar |
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
508 |
$ hg ci -qAm bar |
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
509 |
fncache load triggered! |
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
510 |
|
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
511 |
Unbundling should follow the same rules; existing files should not cause a load: |
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
512 |
|
47447
377d8fc20e34
clone: reuse the stream clone logic for local clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
45681
diff
changeset
|
513 |
(loading during the clone is expected) |
38661
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
514 |
$ hg clone -q . tobundle |
47447
377d8fc20e34
clone: reuse the stream clone logic for local clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
45681
diff
changeset
|
515 |
fncache load triggered! |
377d8fc20e34
clone: reuse the stream clone logic for local clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
45681
diff
changeset
|
516 |
fncache load triggered! |
50673
5d84b1385f7f
treemanifest: make `updatecaches` update the nodemaps for all directories
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
50465
diff
changeset
|
517 |
fncache load triggered! |
47447
377d8fc20e34
clone: reuse the stream clone logic for local clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
45681
diff
changeset
|
518 |
|
38661
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
519 |
$ echo 'new line' > tobundle/bar |
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
520 |
$ hg -R tobundle ci -qm bar |
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
521 |
$ hg -R tobundle bundle -q barupdated.hg |
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
522 |
$ hg unbundle -q barupdated.hg |
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
523 |
|
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
524 |
but adding new files should: |
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
525 |
|
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
526 |
$ touch tobundle/newfile |
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
527 |
$ hg -R tobundle ci -qAm newfile |
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
528 |
$ hg -R tobundle bundle -q newfile.hg |
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
529 |
$ hg unbundle -q newfile.hg |
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
530 |
fncache load triggered! |
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
531 |
|
8ac0c9cd4c48
fncache: avoid loading the filename cache when not actually modifying it
Martijn Pieters <mj@zopatista.com>
parents:
37415
diff
changeset
|
532 |
$ cd .. |