##// END OF EJS Templates
manifestcache: clear the cache before testing the debug command...
marmoute -
r42129:6386f9a4 default
parent child Browse files
Show More
@@ -1,181 +1,185 b''
1 Source bundle was generated with the following script:
1 Source bundle was generated with the following script:
2
2
3 # hg init
3 # hg init
4 # echo a > a
4 # echo a > a
5 # ln -s a l
5 # ln -s a l
6 # hg ci -Ama -d'0 0'
6 # hg ci -Ama -d'0 0'
7 # mkdir b
7 # mkdir b
8 # echo a > b/a
8 # echo a > b/a
9 # chmod +x b/a
9 # chmod +x b/a
10 # hg ci -Amb -d'1 0'
10 # hg ci -Amb -d'1 0'
11
11
12 $ hg init
12 $ hg init
13 $ hg unbundle "$TESTDIR/bundles/test-manifest.hg"
13 $ hg unbundle "$TESTDIR/bundles/test-manifest.hg"
14 adding changesets
14 adding changesets
15 adding manifests
15 adding manifests
16 adding file changes
16 adding file changes
17 added 2 changesets with 3 changes to 3 files
17 added 2 changesets with 3 changes to 3 files
18 new changesets b73562a03cfe:5bdc995175ba (2 drafts)
18 new changesets b73562a03cfe:5bdc995175ba (2 drafts)
19 (run 'hg update' to get a working copy)
19 (run 'hg update' to get a working copy)
20
20
21 The next call is expected to return nothing:
21 The next call is expected to return nothing:
22
22
23 $ hg manifest
23 $ hg manifest
24
24
25 $ hg co
25 $ hg co
26 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
26 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
27
27
28 $ hg manifest
28 $ hg manifest
29 a
29 a
30 b/a
30 b/a
31 l
31 l
32
32
33 $ hg files -vr .
33 $ hg files -vr .
34 2 a
34 2 a
35 2 x b/a
35 2 x b/a
36 1 l l
36 1 l l
37 $ hg files -r . -X b
37 $ hg files -r . -X b
38 a
38 a
39 l
39 l
40 $ hg files -T '{path} {size} {flags}\n'
40 $ hg files -T '{path} {size} {flags}\n'
41 a 2
41 a 2
42 b/a 2 x
42 b/a 2 x
43 l 1 l
43 l 1 l
44 $ hg files -T '{path} {node|shortest}\n' -r.
44 $ hg files -T '{path} {node|shortest}\n' -r.
45 a 5bdc
45 a 5bdc
46 b/a 5bdc
46 b/a 5bdc
47 l 5bdc
47 l 5bdc
48
48
49 $ hg manifest -v
49 $ hg manifest -v
50 644 a
50 644 a
51 755 * b/a
51 755 * b/a
52 644 @ l
52 644 @ l
53 $ hg manifest -T '{path} {rev}\n'
53 $ hg manifest -T '{path} {rev}\n'
54 a 1
54 a 1
55 b/a 1
55 b/a 1
56 l 1
56 l 1
57
57
58 $ hg manifest --debug
58 $ hg manifest --debug
59 b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 644 a
59 b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 644 a
60 b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 755 * b/a
60 b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 755 * b/a
61 047b75c6d7a3ef6a2243bd0e99f94f6ea6683597 644 @ l
61 047b75c6d7a3ef6a2243bd0e99f94f6ea6683597 644 @ l
62
62
63 $ hg manifest -r 0
63 $ hg manifest -r 0
64 a
64 a
65 l
65 l
66
66
67 $ hg manifest -r 1
67 $ hg manifest -r 1
68 a
68 a
69 b/a
69 b/a
70 l
70 l
71
71
72 $ hg manifest -r tip
72 $ hg manifest -r tip
73 a
73 a
74 b/a
74 b/a
75 l
75 l
76
76
77 $ hg manifest tip
77 $ hg manifest tip
78 a
78 a
79 b/a
79 b/a
80 l
80 l
81
81
82 $ hg manifest --all
82 $ hg manifest --all
83 a
83 a
84 b/a
84 b/a
85 l
85 l
86
86
87 The next two calls are expected to abort:
87 The next two calls are expected to abort:
88
88
89 $ hg manifest -r 2
89 $ hg manifest -r 2
90 abort: unknown revision '2'!
90 abort: unknown revision '2'!
91 [255]
91 [255]
92
92
93 $ hg manifest -r tip tip
93 $ hg manifest -r tip tip
94 abort: please specify just one revision
94 abort: please specify just one revision
95 [255]
95 [255]
96
96
97 Testing the manifest full text cache utility
97 Testing the manifest full text cache utility
98 --------------------------------------------
98 --------------------------------------------
99
99
100 Reminder of the manifest log content
100 Reminder of the manifest log content
101
101
102 $ hg log --debug | grep 'manifest:'
102 $ hg log --debug | grep 'manifest:'
103 manifest: 1:1e01206b1d2f72bd55f2a33fa8ccad74144825b7
103 manifest: 1:1e01206b1d2f72bd55f2a33fa8ccad74144825b7
104 manifest: 0:fce2a30dedad1eef4da95ca1dc0004157aa527cf
104 manifest: 0:fce2a30dedad1eef4da95ca1dc0004157aa527cf
105
105
106 Showing the content of the caches after the above operations
106 Showing the content of the caches after the above operations
107
107
108 $ hg debugmanifestfulltextcache
108 $ hg debugmanifestfulltextcache
109 cache empty
109 cache empty
110
110
111 (Clearing the cache in case of any content)
112
113 $ hg debugmanifestfulltextcache --clear
114
111 Adding a new persistent entry in the cache
115 Adding a new persistent entry in the cache
112
116
113 $ hg debugmanifestfulltextcache --add 1e01206b1d2f72bd55f2a33fa8ccad74144825b7
117 $ hg debugmanifestfulltextcache --add 1e01206b1d2f72bd55f2a33fa8ccad74144825b7
114
118
115 $ hg debugmanifestfulltextcache
119 $ hg debugmanifestfulltextcache
116 cache contains 1 manifest entries, in order of most to least recent:
120 cache contains 1 manifest entries, in order of most to least recent:
117 id: 1e01206b1d2f72bd55f2a33fa8ccad74144825b7, size 133 bytes
121 id: 1e01206b1d2f72bd55f2a33fa8ccad74144825b7, size 133 bytes
118 total cache data size 157 bytes, on-disk 157 bytes
122 total cache data size 157 bytes, on-disk 157 bytes
119
123
120 Check we don't duplicated entry (added from the debug command)
124 Check we don't duplicated entry (added from the debug command)
121
125
122 $ hg debugmanifestfulltextcache --add 1e01206b1d2f72bd55f2a33fa8ccad74144825b7
126 $ hg debugmanifestfulltextcache --add 1e01206b1d2f72bd55f2a33fa8ccad74144825b7
123 $ hg debugmanifestfulltextcache
127 $ hg debugmanifestfulltextcache
124 cache contains 1 manifest entries, in order of most to least recent:
128 cache contains 1 manifest entries, in order of most to least recent:
125 id: 1e01206b1d2f72bd55f2a33fa8ccad74144825b7, size 133 bytes
129 id: 1e01206b1d2f72bd55f2a33fa8ccad74144825b7, size 133 bytes
126 total cache data size 157 bytes, on-disk 157 bytes
130 total cache data size 157 bytes, on-disk 157 bytes
127
131
128 Adding a second entry
132 Adding a second entry
129
133
130 $ hg debugmanifestfulltextcache --add fce2a30dedad1eef4da95ca1dc0004157aa527cf
134 $ hg debugmanifestfulltextcache --add fce2a30dedad1eef4da95ca1dc0004157aa527cf
131 $ hg debugmanifestfulltextcache
135 $ hg debugmanifestfulltextcache
132 cache contains 2 manifest entries, in order of most to least recent:
136 cache contains 2 manifest entries, in order of most to least recent:
133 id: fce2a30dedad1eef4da95ca1dc0004157aa527cf, size 87 bytes
137 id: fce2a30dedad1eef4da95ca1dc0004157aa527cf, size 87 bytes
134 id: 1e01206b1d2f72bd55f2a33fa8ccad74144825b7, size 133 bytes
138 id: 1e01206b1d2f72bd55f2a33fa8ccad74144825b7, size 133 bytes
135 total cache data size 268 bytes, on-disk 268 bytes
139 total cache data size 268 bytes, on-disk 268 bytes
136
140
137 Accessing the initial entry again, refresh their order
141 Accessing the initial entry again, refresh their order
138
142
139 $ hg debugmanifestfulltextcache --add 1e01206b1d2f72bd55f2a33fa8ccad74144825b7
143 $ hg debugmanifestfulltextcache --add 1e01206b1d2f72bd55f2a33fa8ccad74144825b7
140 $ hg debugmanifestfulltextcache
144 $ hg debugmanifestfulltextcache
141 cache contains 2 manifest entries, in order of most to least recent:
145 cache contains 2 manifest entries, in order of most to least recent:
142 id: 1e01206b1d2f72bd55f2a33fa8ccad74144825b7, size 133 bytes
146 id: 1e01206b1d2f72bd55f2a33fa8ccad74144825b7, size 133 bytes
143 id: fce2a30dedad1eef4da95ca1dc0004157aa527cf, size 87 bytes
147 id: fce2a30dedad1eef4da95ca1dc0004157aa527cf, size 87 bytes
144 total cache data size 268 bytes, on-disk 268 bytes
148 total cache data size 268 bytes, on-disk 268 bytes
145
149
146 Check cache clearing
150 Check cache clearing
147
151
148 $ hg debugmanifestfulltextcache --clear
152 $ hg debugmanifestfulltextcache --clear
149 $ hg debugmanifestfulltextcache
153 $ hg debugmanifestfulltextcache
150 cache empty
154 cache empty
151
155
152 Check adding multiple entry in one go:
156 Check adding multiple entry in one go:
153
157
154 $ hg debugmanifestfulltextcache --add fce2a30dedad1eef4da95ca1dc0004157aa527cf --add 1e01206b1d2f72bd55f2a33fa8ccad74144825b7
158 $ hg debugmanifestfulltextcache --add fce2a30dedad1eef4da95ca1dc0004157aa527cf --add 1e01206b1d2f72bd55f2a33fa8ccad74144825b7
155 $ hg debugmanifestfulltextcache
159 $ hg debugmanifestfulltextcache
156 cache contains 2 manifest entries, in order of most to least recent:
160 cache contains 2 manifest entries, in order of most to least recent:
157 id: 1e01206b1d2f72bd55f2a33fa8ccad74144825b7, size 133 bytes
161 id: 1e01206b1d2f72bd55f2a33fa8ccad74144825b7, size 133 bytes
158 id: fce2a30dedad1eef4da95ca1dc0004157aa527cf, size 87 bytes
162 id: fce2a30dedad1eef4da95ca1dc0004157aa527cf, size 87 bytes
159 total cache data size 268 bytes, on-disk 268 bytes
163 total cache data size 268 bytes, on-disk 268 bytes
160 $ hg debugmanifestfulltextcache --clear
164 $ hg debugmanifestfulltextcache --clear
161
165
162 Test caching behavior on actual operation
166 Test caching behavior on actual operation
163 -----------------------------------------
167 -----------------------------------------
164
168
165 Make sure we start empty
169 Make sure we start empty
166
170
167 $ hg debugmanifestfulltextcache
171 $ hg debugmanifestfulltextcache
168 cache empty
172 cache empty
169
173
170 Commit should have the new node cached:
174 Commit should have the new node cached:
171
175
172 $ echo a >> b/a
176 $ echo a >> b/a
173 $ hg commit -m 'foo'
177 $ hg commit -m 'foo'
174 $ hg debugmanifestfulltextcache
178 $ hg debugmanifestfulltextcache
175 cache contains 2 manifest entries, in order of most to least recent:
179 cache contains 2 manifest entries, in order of most to least recent:
176 id: 26b8653b67af8c1a0a0317c4ee8dac50a41fdb65, size 133 bytes
180 id: 26b8653b67af8c1a0a0317c4ee8dac50a41fdb65, size 133 bytes
177 id: 1e01206b1d2f72bd55f2a33fa8ccad74144825b7, size 133 bytes
181 id: 1e01206b1d2f72bd55f2a33fa8ccad74144825b7, size 133 bytes
178 total cache data size 314 bytes, on-disk 314 bytes
182 total cache data size 314 bytes, on-disk 314 bytes
179 $ hg log -r 'ancestors(., 1)' --debug | grep 'manifest:'
183 $ hg log -r 'ancestors(., 1)' --debug | grep 'manifest:'
180 manifest: 1:1e01206b1d2f72bd55f2a33fa8ccad74144825b7
184 manifest: 1:1e01206b1d2f72bd55f2a33fa8ccad74144825b7
181 manifest: 2:26b8653b67af8c1a0a0317c4ee8dac50a41fdb65
185 manifest: 2:26b8653b67af8c1a0a0317c4ee8dac50a41fdb65
General Comments 0
You need to be logged in to leave comments. Login now