Show More
@@ -1,278 +1,378 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 contains 1 manifest entries, in order of most to least recent: |
|
109 | cache contains 1 manifest entries, in order of most to least recent: | |
110 | id: 1e01206b1d2f72bd55f2a33fa8ccad74144825b7, size 133 bytes |
|
110 | id: 1e01206b1d2f72bd55f2a33fa8ccad74144825b7, size 133 bytes | |
111 | total cache data size 157 bytes, on-disk 157 bytes |
|
111 | total cache data size 157 bytes, on-disk 157 bytes | |
112 |
|
112 | |||
113 | (Clearing the cache in case of any content) |
|
113 | (Clearing the cache in case of any content) | |
114 |
|
114 | |||
115 | $ hg debugmanifestfulltextcache --clear |
|
115 | $ hg debugmanifestfulltextcache --clear | |
116 |
|
116 | |||
117 | Adding a new persistent entry in the cache |
|
117 | Adding a new persistent entry in the cache | |
118 |
|
118 | |||
119 | $ hg debugmanifestfulltextcache --add 1e01206b1d2f72bd55f2a33fa8ccad74144825b7 |
|
119 | $ hg debugmanifestfulltextcache --add 1e01206b1d2f72bd55f2a33fa8ccad74144825b7 | |
120 |
|
120 | |||
121 | $ hg debugmanifestfulltextcache |
|
121 | $ hg debugmanifestfulltextcache | |
122 | cache contains 1 manifest entries, in order of most to least recent: |
|
122 | cache contains 1 manifest entries, in order of most to least recent: | |
123 | id: 1e01206b1d2f72bd55f2a33fa8ccad74144825b7, size 133 bytes |
|
123 | id: 1e01206b1d2f72bd55f2a33fa8ccad74144825b7, size 133 bytes | |
124 | total cache data size 157 bytes, on-disk 157 bytes |
|
124 | total cache data size 157 bytes, on-disk 157 bytes | |
125 |
|
125 | |||
126 | Check we don't duplicated entry (added from the debug command) |
|
126 | Check we don't duplicated entry (added from the debug command) | |
127 |
|
127 | |||
128 | $ hg debugmanifestfulltextcache --add 1e01206b1d2f72bd55f2a33fa8ccad74144825b7 |
|
128 | $ hg debugmanifestfulltextcache --add 1e01206b1d2f72bd55f2a33fa8ccad74144825b7 | |
129 | $ hg debugmanifestfulltextcache |
|
129 | $ hg debugmanifestfulltextcache | |
130 | cache contains 1 manifest entries, in order of most to least recent: |
|
130 | cache contains 1 manifest entries, in order of most to least recent: | |
131 | id: 1e01206b1d2f72bd55f2a33fa8ccad74144825b7, size 133 bytes |
|
131 | id: 1e01206b1d2f72bd55f2a33fa8ccad74144825b7, size 133 bytes | |
132 | total cache data size 157 bytes, on-disk 157 bytes |
|
132 | total cache data size 157 bytes, on-disk 157 bytes | |
133 |
|
133 | |||
134 | Adding a second entry |
|
134 | Adding a second entry | |
135 |
|
135 | |||
136 | $ hg debugmanifestfulltextcache --add fce2a30dedad1eef4da95ca1dc0004157aa527cf |
|
136 | $ hg debugmanifestfulltextcache --add fce2a30dedad1eef4da95ca1dc0004157aa527cf | |
137 | $ hg debugmanifestfulltextcache |
|
137 | $ hg debugmanifestfulltextcache | |
138 | cache contains 2 manifest entries, in order of most to least recent: |
|
138 | cache contains 2 manifest entries, in order of most to least recent: | |
139 | id: fce2a30dedad1eef4da95ca1dc0004157aa527cf, size 87 bytes |
|
139 | id: fce2a30dedad1eef4da95ca1dc0004157aa527cf, size 87 bytes | |
140 | id: 1e01206b1d2f72bd55f2a33fa8ccad74144825b7, size 133 bytes |
|
140 | id: 1e01206b1d2f72bd55f2a33fa8ccad74144825b7, size 133 bytes | |
141 | total cache data size 268 bytes, on-disk 268 bytes |
|
141 | total cache data size 268 bytes, on-disk 268 bytes | |
142 |
|
142 | |||
143 | Accessing the initial entry again, refresh their order |
|
143 | Accessing the initial entry again, refresh their order | |
144 |
|
144 | |||
145 | $ hg debugmanifestfulltextcache --add 1e01206b1d2f72bd55f2a33fa8ccad74144825b7 |
|
145 | $ hg debugmanifestfulltextcache --add 1e01206b1d2f72bd55f2a33fa8ccad74144825b7 | |
146 | $ hg debugmanifestfulltextcache |
|
146 | $ hg debugmanifestfulltextcache | |
147 | cache contains 2 manifest entries, in order of most to least recent: |
|
147 | cache contains 2 manifest entries, in order of most to least recent: | |
148 | id: 1e01206b1d2f72bd55f2a33fa8ccad74144825b7, size 133 bytes |
|
148 | id: 1e01206b1d2f72bd55f2a33fa8ccad74144825b7, size 133 bytes | |
149 | id: fce2a30dedad1eef4da95ca1dc0004157aa527cf, size 87 bytes |
|
149 | id: fce2a30dedad1eef4da95ca1dc0004157aa527cf, size 87 bytes | |
150 | total cache data size 268 bytes, on-disk 268 bytes |
|
150 | total cache data size 268 bytes, on-disk 268 bytes | |
151 |
|
151 | |||
152 | Check cache clearing |
|
152 | Check cache clearing | |
153 |
|
153 | |||
154 | $ hg debugmanifestfulltextcache --clear |
|
154 | $ hg debugmanifestfulltextcache --clear | |
155 | $ hg debugmanifestfulltextcache |
|
155 | $ hg debugmanifestfulltextcache | |
156 | cache empty |
|
156 | cache empty | |
157 |
|
157 | |||
158 | Check adding multiple entry in one go: |
|
158 | Check adding multiple entry in one go: | |
159 |
|
159 | |||
160 | $ hg debugmanifestfulltextcache --add fce2a30dedad1eef4da95ca1dc0004157aa527cf --add 1e01206b1d2f72bd55f2a33fa8ccad74144825b7 |
|
160 | $ hg debugmanifestfulltextcache --add fce2a30dedad1eef4da95ca1dc0004157aa527cf --add 1e01206b1d2f72bd55f2a33fa8ccad74144825b7 | |
161 | $ hg debugmanifestfulltextcache |
|
161 | $ hg debugmanifestfulltextcache | |
162 | cache contains 2 manifest entries, in order of most to least recent: |
|
162 | cache contains 2 manifest entries, in order of most to least recent: | |
163 | id: 1e01206b1d2f72bd55f2a33fa8ccad74144825b7, size 133 bytes |
|
163 | id: 1e01206b1d2f72bd55f2a33fa8ccad74144825b7, size 133 bytes | |
164 | id: fce2a30dedad1eef4da95ca1dc0004157aa527cf, size 87 bytes |
|
164 | id: fce2a30dedad1eef4da95ca1dc0004157aa527cf, size 87 bytes | |
165 | total cache data size 268 bytes, on-disk 268 bytes |
|
165 | total cache data size 268 bytes, on-disk 268 bytes | |
166 | $ hg debugmanifestfulltextcache --clear |
|
166 | $ hg debugmanifestfulltextcache --clear | |
167 |
|
167 | |||
168 | Test caching behavior on actual operation |
|
168 | Test caching behavior on actual operation | |
169 | ----------------------------------------- |
|
169 | ----------------------------------------- | |
170 |
|
170 | |||
171 | Make sure we start empty |
|
171 | Make sure we start empty | |
172 |
|
172 | |||
173 | $ hg debugmanifestfulltextcache |
|
173 | $ hg debugmanifestfulltextcache | |
174 | cache empty |
|
174 | cache empty | |
175 |
|
175 | |||
176 | Commit should have the new node cached: |
|
176 | Commit should have the new node cached: | |
177 |
|
177 | |||
178 | $ echo a >> b/a |
|
178 | $ echo a >> b/a | |
179 | $ hg commit -m 'foo' |
|
179 | $ hg commit -m 'foo' | |
180 | $ hg debugmanifestfulltextcache |
|
180 | $ hg debugmanifestfulltextcache | |
181 | cache contains 2 manifest entries, in order of most to least recent: |
|
181 | cache contains 2 manifest entries, in order of most to least recent: | |
182 | id: 26b8653b67af8c1a0a0317c4ee8dac50a41fdb65, size 133 bytes |
|
182 | id: 26b8653b67af8c1a0a0317c4ee8dac50a41fdb65, size 133 bytes | |
183 | id: 1e01206b1d2f72bd55f2a33fa8ccad74144825b7, size 133 bytes |
|
183 | id: 1e01206b1d2f72bd55f2a33fa8ccad74144825b7, size 133 bytes | |
184 | total cache data size 314 bytes, on-disk 314 bytes |
|
184 | total cache data size 314 bytes, on-disk 314 bytes | |
185 | $ hg log -r 'ancestors(., 1)' --debug | grep 'manifest:' |
|
185 | $ hg log -r 'ancestors(., 1)' --debug | grep 'manifest:' | |
186 | manifest: 1:1e01206b1d2f72bd55f2a33fa8ccad74144825b7 |
|
186 | manifest: 1:1e01206b1d2f72bd55f2a33fa8ccad74144825b7 | |
187 | manifest: 2:26b8653b67af8c1a0a0317c4ee8dac50a41fdb65 |
|
187 | manifest: 2:26b8653b67af8c1a0a0317c4ee8dac50a41fdb65 | |
188 |
|
188 | |||
189 | hg update should warm the cache too |
|
189 | hg update should warm the cache too | |
190 |
|
190 | |||
191 | (force dirstate check to avoid flackiness in manifest order) |
|
191 | (force dirstate check to avoid flackiness in manifest order) | |
192 | $ hg debugrebuilddirstate |
|
192 | $ hg debugrebuilddirstate | |
193 |
|
193 | |||
194 | $ hg update 0 |
|
194 | $ hg update 0 | |
195 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
195 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
196 | $ hg debugmanifestfulltextcache |
|
196 | $ hg debugmanifestfulltextcache | |
197 | cache contains 3 manifest entries, in order of most to least recent: |
|
197 | cache contains 3 manifest entries, in order of most to least recent: | |
198 | id: fce2a30dedad1eef4da95ca1dc0004157aa527cf, size 87 bytes |
|
198 | id: fce2a30dedad1eef4da95ca1dc0004157aa527cf, size 87 bytes | |
199 | id: 26b8653b67af8c1a0a0317c4ee8dac50a41fdb65, size 133 bytes |
|
199 | id: 26b8653b67af8c1a0a0317c4ee8dac50a41fdb65, size 133 bytes | |
200 | id: 1e01206b1d2f72bd55f2a33fa8ccad74144825b7, size 133 bytes |
|
200 | id: 1e01206b1d2f72bd55f2a33fa8ccad74144825b7, size 133 bytes | |
201 | total cache data size 425 bytes, on-disk 425 bytes |
|
201 | total cache data size 425 bytes, on-disk 425 bytes | |
202 | $ hg log -r '0' --debug | grep 'manifest:' |
|
202 | $ hg log -r '0' --debug | grep 'manifest:' | |
203 | manifest: 0:fce2a30dedad1eef4da95ca1dc0004157aa527cf |
|
203 | manifest: 0:fce2a30dedad1eef4da95ca1dc0004157aa527cf | |
204 |
|
204 | |||
205 | Test file removal (especially with pure). The tests are crafted such that there |
|
205 | Test file removal (especially with pure). The tests are crafted such that there | |
206 | will be contiguous spans of existing entries to ensure that is handled properly. |
|
206 | will be contiguous spans of existing entries to ensure that is handled properly. | |
207 | (In this case, a.txt, aa.txt and c.txt, cc.txt, and ccc.txt) |
|
207 | (In this case, a.txt, aa.txt and c.txt, cc.txt, and ccc.txt) | |
208 |
|
208 | |||
209 | $ cat > $TESTTMP/manifest.py <<EOF |
|
209 | $ cat > $TESTTMP/manifest.py <<EOF | |
210 | > from mercurial import ( |
|
210 | > from mercurial import ( | |
211 | > extensions, |
|
211 | > extensions, | |
212 | > manifest, |
|
212 | > manifest, | |
213 | > ) |
|
213 | > ) | |
214 | > def extsetup(ui): |
|
214 | > def extsetup(ui): | |
215 | > manifest.FASTDELTA_TEXTDIFF_THRESHOLD = 0 |
|
215 | > manifest.FASTDELTA_TEXTDIFF_THRESHOLD = 0 | |
216 | > EOF |
|
216 | > EOF | |
217 | $ cat >> $HGRCPATH <<EOF |
|
217 | $ cat >> $HGRCPATH <<EOF | |
218 | > [extensions] |
|
218 | > [extensions] | |
219 | > manifest = $TESTTMP/manifest.py |
|
219 | > manifest = $TESTTMP/manifest.py | |
220 | > EOF |
|
220 | > EOF | |
221 |
|
221 | |||
222 | Pure removes should actually remove all dropped entries |
|
222 | Pure removes should actually remove all dropped entries | |
223 |
|
223 | |||
224 | $ hg init repo |
|
224 | $ hg init repo | |
225 | $ cd repo |
|
225 | $ cd repo | |
226 | $ echo a > a.txt |
|
226 | $ echo a > a.txt | |
227 | $ echo aa > aa.txt |
|
227 | $ echo aa > aa.txt | |
228 | $ echo b > b.txt |
|
228 | $ echo b > b.txt | |
229 | $ echo c > c.txt |
|
229 | $ echo c > c.txt | |
230 | $ echo c > cc.txt |
|
230 | $ echo c > cc.txt | |
231 | $ echo c > ccc.txt |
|
231 | $ echo c > ccc.txt | |
232 | $ echo b > d.txt |
|
232 | $ echo b > d.txt | |
233 | $ echo c > e.txt |
|
233 | $ echo c > e.txt | |
234 | $ hg ci -Aqm 'a-e' |
|
234 | $ hg ci -Aqm 'a-e' | |
235 |
|
235 | |||
236 | $ hg rm b.txt d.txt |
|
236 | $ hg rm b.txt d.txt | |
237 | $ hg ci -m 'remove b and d' |
|
237 | $ hg ci -m 'remove b and d' | |
238 |
|
238 | |||
239 | $ hg debugdata -m 1 |
|
239 | $ hg debugdata -m 1 | |
240 | a.txt\x00b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 (esc) |
|
240 | a.txt\x00b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 (esc) | |
241 | aa.txt\x00a4bdc161c8fbb523c9a60409603f8710ff49a571 (esc) |
|
241 | aa.txt\x00a4bdc161c8fbb523c9a60409603f8710ff49a571 (esc) | |
242 | c.txt\x00149da44f2a4e14f488b7bd4157945a9837408c00 (esc) |
|
242 | c.txt\x00149da44f2a4e14f488b7bd4157945a9837408c00 (esc) | |
243 | cc.txt\x00149da44f2a4e14f488b7bd4157945a9837408c00 (esc) |
|
243 | cc.txt\x00149da44f2a4e14f488b7bd4157945a9837408c00 (esc) | |
244 | ccc.txt\x00149da44f2a4e14f488b7bd4157945a9837408c00 (esc) |
|
244 | ccc.txt\x00149da44f2a4e14f488b7bd4157945a9837408c00 (esc) | |
245 | e.txt\x00149da44f2a4e14f488b7bd4157945a9837408c00 (esc) |
|
245 | e.txt\x00149da44f2a4e14f488b7bd4157945a9837408c00 (esc) | |
246 |
|
246 | |||
247 | $ hg up -qC . |
|
247 | $ hg up -qC . | |
248 |
|
248 | |||
249 | $ hg verify |
|
249 | $ hg verify | |
250 | checking changesets |
|
250 | checking changesets | |
251 | checking manifests |
|
251 | checking manifests | |
252 | crosschecking files in changesets and manifests |
|
252 | crosschecking files in changesets and manifests | |
253 | checking files |
|
253 | checking files | |
254 | checked 2 changesets with 8 changes to 8 files |
|
254 | checked 2 changesets with 8 changes to 8 files | |
255 |
|
255 | |||
256 | $ hg rollback -q --config ui.rollback=True |
|
256 | $ hg rollback -q --config ui.rollback=True | |
257 | $ hg rm b.txt d.txt |
|
257 | $ hg rm b.txt d.txt | |
258 | $ echo bb > bb.txt |
|
258 | $ echo bb > bb.txt | |
259 |
|
259 | |||
260 | A mix of adds and removes should remove all dropped entries. |
|
260 | A mix of adds and removes should remove all dropped entries. | |
261 |
|
261 | |||
262 | $ hg ci -Aqm 'remove b and d; add bb' |
|
262 | $ hg ci -Aqm 'remove b and d; add bb' | |
263 |
|
263 | |||
264 | $ hg debugdata -m 1 |
|
264 | $ hg debugdata -m 1 | |
265 | a.txt\x00b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 (esc) |
|
265 | a.txt\x00b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 (esc) | |
266 | aa.txt\x00a4bdc161c8fbb523c9a60409603f8710ff49a571 (esc) |
|
266 | aa.txt\x00a4bdc161c8fbb523c9a60409603f8710ff49a571 (esc) | |
267 | bb.txt\x0004c6faf8a9fdd848a5304dfc1704749a374dff44 (esc) |
|
267 | bb.txt\x0004c6faf8a9fdd848a5304dfc1704749a374dff44 (esc) | |
268 | c.txt\x00149da44f2a4e14f488b7bd4157945a9837408c00 (esc) |
|
268 | c.txt\x00149da44f2a4e14f488b7bd4157945a9837408c00 (esc) | |
269 | cc.txt\x00149da44f2a4e14f488b7bd4157945a9837408c00 (esc) |
|
269 | cc.txt\x00149da44f2a4e14f488b7bd4157945a9837408c00 (esc) | |
270 | ccc.txt\x00149da44f2a4e14f488b7bd4157945a9837408c00 (esc) |
|
270 | ccc.txt\x00149da44f2a4e14f488b7bd4157945a9837408c00 (esc) | |
271 | e.txt\x00149da44f2a4e14f488b7bd4157945a9837408c00 (esc) |
|
271 | e.txt\x00149da44f2a4e14f488b7bd4157945a9837408c00 (esc) | |
272 |
|
272 | |||
273 | $ hg verify |
|
273 | $ hg verify | |
274 | checking changesets |
|
274 | checking changesets | |
275 | checking manifests |
|
275 | checking manifests | |
276 | crosschecking files in changesets and manifests |
|
276 | crosschecking files in changesets and manifests | |
277 | checking files |
|
277 | checking files | |
278 | checked 2 changesets with 9 changes to 9 files |
|
278 | checked 2 changesets with 9 changes to 9 files | |
|
279 | $ cd .. | |||
|
280 | ||||
|
281 | Test manifest cache interraction with shares | |||
|
282 | ============================================ | |||
|
283 | ||||
|
284 | $ echo '[extensions]' >> $HGRCPATH | |||
|
285 | $ echo 'share=' >> $HGRCPATH | |||
|
286 | ||||
|
287 | creating some history | |||
|
288 | ||||
|
289 | $ hg init share-source | |||
|
290 | $ hg debugbuilddag .+10 -n -R share-source | |||
|
291 | $ hg log --debug -r . -R share-source | grep 'manifest:' | |||
|
292 | manifest: -1:0000000000000000000000000000000000000000 | |||
|
293 | $ hg log -r . -R share-source | |||
|
294 | changeset: -1:000000000000 | |||
|
295 | user: | |||
|
296 | date: Thu Jan 01 00:00:00 1970 +0000 | |||
|
297 | ||||
|
298 | $ hg debugmanifestfulltextcache -R share-source | |||
|
299 | cache contains 4 manifest entries, in order of most to least recent: | |||
|
300 | id: b264454d7033405774b9f353b9b37a082c1a8fba, size 496 bytes | |||
|
301 | id: c6e7b359cbbb5469e98f35acd73ac4757989c4d8, size 450 bytes | |||
|
302 | id: 8de636143b0acc5236cb47ca914bd482d82e6f35, size 405 bytes | |||
|
303 | id: 7d32499319983d90f97ca02a6c2057a1030bebbb, size 360 bytes | |||
|
304 | total cache data size 1.76 KB, on-disk 1.76 KB | |||
|
305 | $ hg -R share-source update 1 | |||
|
306 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
307 | $ hg debugmanifestfulltextcache -R share-source | |||
|
308 | cache contains 4 manifest entries, in order of most to least recent: | |||
|
309 | id: fffc37b38c401b1ab4f8b99da4b72325e31b985f, size 90 bytes | |||
|
310 | id: b264454d7033405774b9f353b9b37a082c1a8fba, size 496 bytes | |||
|
311 | id: c6e7b359cbbb5469e98f35acd73ac4757989c4d8, size 450 bytes | |||
|
312 | id: 8de636143b0acc5236cb47ca914bd482d82e6f35, size 405 bytes | |||
|
313 | total cache data size 1.50 KB, on-disk 1.50 KB | |||
|
314 | ||||
|
315 | making a share out of it. It should have its manifest cache updated | |||
|
316 | ||||
|
317 | $ hg share share-source share-dest | |||
|
318 | updating working directory | |||
|
319 | 11 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
320 | $ hg log --debug -r . -R share-dest | grep 'manifest:' | |||
|
321 | manifest: 10:b264454d7033405774b9f353b9b37a082c1a8fba | |||
|
322 | $ hg debugmanifestfulltextcache -R share-dest | |||
|
323 | cache contains 1 manifest entries, in order of most to least recent: | |||
|
324 | id: b264454d7033405774b9f353b9b37a082c1a8fba, size 496 bytes | |||
|
325 | total cache data size 520 bytes, on-disk 520 bytes | |||
|
326 | ||||
|
327 | update on various side should only affect the target share | |||
|
328 | ||||
|
329 | $ hg update -R share-dest 4 | |||
|
330 | 0 files updated, 0 files merged, 6 files removed, 0 files unresolved | |||
|
331 | $ hg log --debug -r . -R share-dest | grep 'manifest:' | |||
|
332 | manifest: 4:d45ead487afec2588272fcec88a25413c0ec7dc8 | |||
|
333 | $ hg debugmanifestfulltextcache -R share-dest | |||
|
334 | cache contains 2 manifest entries, in order of most to least recent: | |||
|
335 | id: d45ead487afec2588272fcec88a25413c0ec7dc8, size 225 bytes | |||
|
336 | id: b264454d7033405774b9f353b9b37a082c1a8fba, size 496 bytes | |||
|
337 | total cache data size 769 bytes, on-disk 769 bytes | |||
|
338 | $ hg debugmanifestfulltextcache -R share-source | |||
|
339 | cache contains 4 manifest entries, in order of most to least recent: | |||
|
340 | id: fffc37b38c401b1ab4f8b99da4b72325e31b985f, size 90 bytes | |||
|
341 | id: b264454d7033405774b9f353b9b37a082c1a8fba, size 496 bytes | |||
|
342 | id: c6e7b359cbbb5469e98f35acd73ac4757989c4d8, size 450 bytes | |||
|
343 | id: 8de636143b0acc5236cb47ca914bd482d82e6f35, size 405 bytes | |||
|
344 | total cache data size 1.50 KB, on-disk 1.50 KB | |||
|
345 | $ hg update -R share-source 7 | |||
|
346 | 6 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
347 | $ hg log --debug -r . -R share-source | grep 'manifest:' | |||
|
348 | manifest: 7:7d32499319983d90f97ca02a6c2057a1030bebbb | |||
|
349 | $ hg debugmanifestfulltextcache -R share-dest | |||
|
350 | cache contains 2 manifest entries, in order of most to least recent: | |||
|
351 | id: d45ead487afec2588272fcec88a25413c0ec7dc8, size 225 bytes | |||
|
352 | id: b264454d7033405774b9f353b9b37a082c1a8fba, size 496 bytes | |||
|
353 | total cache data size 769 bytes, on-disk 769 bytes | |||
|
354 | $ hg debugmanifestfulltextcache -R share-source | |||
|
355 | cache contains 4 manifest entries, in order of most to least recent: | |||
|
356 | id: 7d32499319983d90f97ca02a6c2057a1030bebbb, size 360 bytes | |||
|
357 | id: fffc37b38c401b1ab4f8b99da4b72325e31b985f, size 90 bytes | |||
|
358 | id: b264454d7033405774b9f353b9b37a082c1a8fba, size 496 bytes | |||
|
359 | id: c6e7b359cbbb5469e98f35acd73ac4757989c4d8, size 450 bytes | |||
|
360 | total cache data size 1.46 KB, on-disk 1.46 KB | |||
|
361 | $ hg update -R share-dest 8 | |||
|
362 | 4 files updated, 0 files merged, 0 files removed, 0 files unresolved | |||
|
363 | $ hg log --debug -r . -R share-dest | grep 'manifest:' | |||
|
364 | manifest: 8:8de636143b0acc5236cb47ca914bd482d82e6f35 | |||
|
365 | $ hg debugmanifestfulltextcache -R share-dest | |||
|
366 | cache contains 3 manifest entries, in order of most to least recent: | |||
|
367 | id: 8de636143b0acc5236cb47ca914bd482d82e6f35, size 405 bytes | |||
|
368 | id: d45ead487afec2588272fcec88a25413c0ec7dc8, size 225 bytes | |||
|
369 | id: b264454d7033405774b9f353b9b37a082c1a8fba, size 496 bytes | |||
|
370 | total cache data size 1.17 KB, on-disk 1.17 KB | |||
|
371 | $ hg debugmanifestfulltextcache -R share-source | |||
|
372 | cache contains 4 manifest entries, in order of most to least recent: | |||
|
373 | id: 7d32499319983d90f97ca02a6c2057a1030bebbb, size 360 bytes | |||
|
374 | id: fffc37b38c401b1ab4f8b99da4b72325e31b985f, size 90 bytes | |||
|
375 | id: b264454d7033405774b9f353b9b37a082c1a8fba, size 496 bytes | |||
|
376 | id: c6e7b359cbbb5469e98f35acd73ac4757989c4d8, size 450 bytes | |||
|
377 | total cache data size 1.46 KB, on-disk 1.46 KB | |||
|
378 |
General Comments 0
You need to be logged in to leave comments.
Login now