Show More
@@ -1,661 +1,661 | |||
|
1 | 1 | $ cat << EOF >> $HGRCPATH |
|
2 | 2 | > [format] |
|
3 | 3 | > usegeneraldelta=yes |
|
4 | 4 | > [ui] |
|
5 | 5 | > ssh=python "$TESTDIR/dummyssh" |
|
6 | 6 | > EOF |
|
7 | 7 | |
|
8 | 8 | Set up repo |
|
9 | 9 | |
|
10 | 10 | $ hg --config experimental.treemanifest=True init repo |
|
11 | 11 | $ cd repo |
|
12 | 12 | |
|
13 | 13 | Requirements get set on init |
|
14 | 14 | |
|
15 | 15 | $ grep treemanifest .hg/requires |
|
16 | 16 | treemanifest |
|
17 | 17 | |
|
18 | 18 | Without directories, looks like any other repo |
|
19 | 19 | |
|
20 | 20 | $ echo 0 > a |
|
21 | 21 | $ echo 0 > b |
|
22 | 22 | $ hg ci -Aqm initial |
|
23 | 23 | $ hg debugdata -m 0 |
|
24 | 24 | a\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (esc) |
|
25 | 25 | b\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (esc) |
|
26 | 26 | |
|
27 | 27 | Submanifest is stored in separate revlog |
|
28 | 28 | |
|
29 | 29 | $ mkdir dir1 |
|
30 | 30 | $ echo 1 > dir1/a |
|
31 | 31 | $ echo 1 > dir1/b |
|
32 | 32 | $ echo 1 > e |
|
33 | 33 | $ hg ci -Aqm 'add dir1' |
|
34 | 34 | $ hg debugdata -m 1 |
|
35 | 35 | a\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (esc) |
|
36 | 36 | b\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (esc) |
|
37 | 37 | dir1\x008b3ffd73f901e83304c83d33132c8e774ceac44et (esc) |
|
38 | 38 | e\x00b8e02f6433738021a065f94175c7cd23db5f05be (esc) |
|
39 | 39 | $ hg debugdata --dir dir1 0 |
|
40 | 40 | a\x00b8e02f6433738021a065f94175c7cd23db5f05be (esc) |
|
41 | 41 | b\x00b8e02f6433738021a065f94175c7cd23db5f05be (esc) |
|
42 | 42 | |
|
43 | 43 | Can add nested directories |
|
44 | 44 | |
|
45 | 45 | $ mkdir dir1/dir1 |
|
46 | 46 | $ echo 2 > dir1/dir1/a |
|
47 | 47 | $ echo 2 > dir1/dir1/b |
|
48 | 48 | $ mkdir dir1/dir2 |
|
49 | 49 | $ echo 2 > dir1/dir2/a |
|
50 | 50 | $ echo 2 > dir1/dir2/b |
|
51 | 51 | $ hg ci -Aqm 'add dir1/dir1' |
|
52 | 52 | $ hg files -r . |
|
53 | 53 | a |
|
54 | 54 | b |
|
55 | 55 | dir1/a (glob) |
|
56 | 56 | dir1/b (glob) |
|
57 | 57 | dir1/dir1/a (glob) |
|
58 | 58 | dir1/dir1/b (glob) |
|
59 | 59 | dir1/dir2/a (glob) |
|
60 | 60 | dir1/dir2/b (glob) |
|
61 | 61 | e |
|
62 | 62 | |
|
63 | 63 | Revision is not created for unchanged directory |
|
64 | 64 | |
|
65 | 65 | $ mkdir dir2 |
|
66 | 66 | $ echo 3 > dir2/a |
|
67 | 67 | $ hg add dir2 |
|
68 | 68 | adding dir2/a (glob) |
|
69 | 69 | $ hg debugindex --dir dir1 > before |
|
70 | 70 | $ hg ci -qm 'add dir2' |
|
71 | 71 | $ hg debugindex --dir dir1 > after |
|
72 | 72 | $ diff before after |
|
73 | 73 | $ rm before after |
|
74 | 74 | |
|
75 | 75 | Removing directory does not create an revlog entry |
|
76 | 76 | |
|
77 | 77 | $ hg rm dir1/dir1 |
|
78 | 78 | removing dir1/dir1/a (glob) |
|
79 | 79 | removing dir1/dir1/b (glob) |
|
80 | 80 | $ hg debugindex --dir dir1/dir1 > before |
|
81 | 81 | $ hg ci -qm 'remove dir1/dir1' |
|
82 | 82 | $ hg debugindex --dir dir1/dir1 > after |
|
83 | 83 | $ diff before after |
|
84 | 84 | $ rm before after |
|
85 | 85 | |
|
86 | 86 | Check that hg files (calls treemanifest.walk()) works |
|
87 | 87 | without loading all directory revlogs |
|
88 | 88 | |
|
89 | 89 | $ hg co 'desc("add dir2")' |
|
90 | 90 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
91 | 91 | $ mv .hg/store/meta/dir2 .hg/store/meta/dir2-backup |
|
92 | 92 | $ hg files -r . dir1 |
|
93 | 93 | dir1/a (glob) |
|
94 | 94 | dir1/b (glob) |
|
95 | 95 | dir1/dir1/a (glob) |
|
96 | 96 | dir1/dir1/b (glob) |
|
97 | 97 | dir1/dir2/a (glob) |
|
98 | 98 | dir1/dir2/b (glob) |
|
99 | 99 | |
|
100 | 100 | Check that status between revisions works (calls treemanifest.matches()) |
|
101 | 101 | without loading all directory revlogs |
|
102 | 102 | |
|
103 | 103 | $ hg status --rev 'desc("add dir1")' --rev . dir1 |
|
104 | 104 | A dir1/dir1/a |
|
105 | 105 | A dir1/dir1/b |
|
106 | 106 | A dir1/dir2/a |
|
107 | 107 | A dir1/dir2/b |
|
108 | 108 | $ mv .hg/store/meta/dir2-backup .hg/store/meta/dir2 |
|
109 | 109 | |
|
110 | 110 | Merge creates 2-parent revision of directory revlog |
|
111 | 111 | |
|
112 | 112 | $ echo 5 > dir1/a |
|
113 | 113 | $ hg ci -Aqm 'modify dir1/a' |
|
114 | 114 | $ hg co '.^' |
|
115 | 115 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
116 | 116 | $ echo 6 > dir1/b |
|
117 | 117 | $ hg ci -Aqm 'modify dir1/b' |
|
118 | 118 | $ hg merge 'desc("modify dir1/a")' |
|
119 | 119 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
120 | 120 | (branch merge, don't forget to commit) |
|
121 | 121 | $ hg ci -m 'conflict-free merge involving dir1/' |
|
122 | 122 | $ cat dir1/a |
|
123 | 123 | 5 |
|
124 | 124 | $ cat dir1/b |
|
125 | 125 | 6 |
|
126 | 126 | $ hg debugindex --dir dir1 |
|
127 | 127 | rev offset length delta linkrev nodeid p1 p2 |
|
128 | 128 | 0 0 54 -1 1 8b3ffd73f901 000000000000 000000000000 |
|
129 | 129 | 1 54 68 0 2 68e9d057c5a8 8b3ffd73f901 000000000000 |
|
130 | 130 | 2 122 12 1 4 4698198d2624 68e9d057c5a8 000000000000 |
|
131 | 131 | 3 134 55 1 5 44844058ccce 68e9d057c5a8 000000000000 |
|
132 | 132 | 4 189 55 1 6 bf3d9b744927 68e9d057c5a8 000000000000 |
|
133 | 133 | 5 244 55 4 7 dde7c0af2a03 bf3d9b744927 44844058ccce |
|
134 | 134 | |
|
135 | 135 | Merge keeping directory from parent 1 does not create revlog entry. (Note that |
|
136 | 136 | dir1's manifest does change, but only because dir1/a's filelog changes.) |
|
137 | 137 | |
|
138 | 138 | $ hg co 'desc("add dir2")' |
|
139 | 139 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
140 | 140 | $ echo 8 > dir2/a |
|
141 | 141 | $ hg ci -m 'modify dir2/a' |
|
142 | 142 | created new head |
|
143 | 143 | |
|
144 | 144 | $ hg debugindex --dir dir2 > before |
|
145 | 145 | $ hg merge 'desc("modify dir1/a")' |
|
146 | 146 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
147 | 147 | (branch merge, don't forget to commit) |
|
148 | 148 | $ hg revert -r 'desc("modify dir2/a")' . |
|
149 | 149 | reverting dir1/a (glob) |
|
150 | 150 | $ hg ci -m 'merge, keeping parent 1' |
|
151 | 151 | $ hg debugindex --dir dir2 > after |
|
152 | 152 | $ diff before after |
|
153 | 153 | $ rm before after |
|
154 | 154 | |
|
155 | 155 | Merge keeping directory from parent 2 does not create revlog entry. (Note that |
|
156 | 156 | dir2's manifest does change, but only because dir2/a's filelog changes.) |
|
157 | 157 | |
|
158 | 158 | $ hg co 'desc("modify dir2/a")' |
|
159 | 159 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
160 | 160 | $ hg debugindex --dir dir1 > before |
|
161 | 161 | $ hg merge 'desc("modify dir1/a")' |
|
162 | 162 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
163 | 163 | (branch merge, don't forget to commit) |
|
164 | 164 | $ hg revert -r 'desc("modify dir1/a")' . |
|
165 | 165 | reverting dir2/a (glob) |
|
166 | 166 | $ hg ci -m 'merge, keeping parent 2' |
|
167 | 167 | created new head |
|
168 | 168 | $ hg debugindex --dir dir1 > after |
|
169 | 169 | $ diff before after |
|
170 | 170 | $ rm before after |
|
171 | 171 | |
|
172 | 172 | Create flat source repo for tests with mixed flat/tree manifests |
|
173 | 173 | |
|
174 | 174 | $ cd .. |
|
175 | 175 | $ hg init repo-flat |
|
176 | 176 | $ cd repo-flat |
|
177 | 177 | |
|
178 | 178 | Create a few commits with flat manifest |
|
179 | 179 | |
|
180 | 180 | $ echo 0 > a |
|
181 | 181 | $ echo 0 > b |
|
182 | 182 | $ echo 0 > e |
|
183 | 183 | $ for d in dir1 dir1/dir1 dir1/dir2 dir2 |
|
184 | 184 | > do |
|
185 | 185 | > mkdir $d |
|
186 | 186 | > echo 0 > $d/a |
|
187 | 187 | > echo 0 > $d/b |
|
188 | 188 | > done |
|
189 | 189 | $ hg ci -Aqm initial |
|
190 | 190 | |
|
191 | 191 | $ echo 1 > a |
|
192 | 192 | $ echo 1 > dir1/a |
|
193 | 193 | $ echo 1 > dir1/dir1/a |
|
194 | 194 | $ hg ci -Aqm 'modify on branch 1' |
|
195 | 195 | |
|
196 | 196 | $ hg co 0 |
|
197 | 197 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
198 | 198 | $ echo 2 > b |
|
199 | 199 | $ echo 2 > dir1/b |
|
200 | 200 | $ echo 2 > dir1/dir1/b |
|
201 | 201 | $ hg ci -Aqm 'modify on branch 2' |
|
202 | 202 | |
|
203 | 203 | $ hg merge 1 |
|
204 | 204 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
205 | 205 | (branch merge, don't forget to commit) |
|
206 | 206 | $ hg ci -m 'merge of flat manifests to new flat manifest' |
|
207 | 207 | |
|
208 | 208 | $ hg serve -p $HGPORT -d --pid-file=hg.pid --errorlog=errors.log |
|
209 | 209 | $ cat hg.pid >> $DAEMON_PIDS |
|
210 | 210 | |
|
211 | 211 | Create clone with tree manifests enabled |
|
212 | 212 | |
|
213 | 213 | $ cd .. |
|
214 | 214 | $ hg clone --config experimental.treemanifest=1 \ |
|
215 | 215 | > http://localhost:$HGPORT repo-mixed -r 1 |
|
216 | 216 | adding changesets |
|
217 | 217 | adding manifests |
|
218 | 218 | adding file changes |
|
219 | 219 | added 2 changesets with 14 changes to 11 files |
|
220 | 220 | updating to branch default |
|
221 | 221 | 11 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
222 | 222 | $ cd repo-mixed |
|
223 | 223 | $ test -d .hg/store/meta |
|
224 | 224 | [1] |
|
225 | 225 | $ grep treemanifest .hg/requires |
|
226 | 226 | treemanifest |
|
227 | 227 | |
|
228 | 228 | Should be possible to push updates from flat to tree manifest repo |
|
229 | 229 | |
|
230 | 230 | $ hg -R ../repo-flat push ssh://user@dummy/repo-mixed |
|
231 | 231 | pushing to ssh://user@dummy/repo-mixed |
|
232 | 232 | searching for changes |
|
233 | 233 | remote: adding changesets |
|
234 | 234 | remote: adding manifests |
|
235 | 235 | remote: adding file changes |
|
236 | 236 | remote: added 2 changesets with 3 changes to 3 files |
|
237 | 237 | |
|
238 | 238 | Commit should store revlog per directory |
|
239 | 239 | |
|
240 | 240 | $ hg co 1 |
|
241 | 241 | 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
242 | 242 | $ echo 3 > a |
|
243 | 243 | $ echo 3 > dir1/a |
|
244 | 244 | $ echo 3 > dir1/dir1/a |
|
245 | 245 | $ hg ci -m 'first tree' |
|
246 | 246 | created new head |
|
247 | 247 | $ find .hg/store/meta | sort |
|
248 | 248 | .hg/store/meta |
|
249 | 249 | .hg/store/meta/dir1 |
|
250 | 250 | .hg/store/meta/dir1/00manifest.i |
|
251 | 251 | .hg/store/meta/dir1/dir1 |
|
252 | 252 | .hg/store/meta/dir1/dir1/00manifest.i |
|
253 | 253 | .hg/store/meta/dir1/dir2 |
|
254 | 254 | .hg/store/meta/dir1/dir2/00manifest.i |
|
255 | 255 | .hg/store/meta/dir2 |
|
256 | 256 | .hg/store/meta/dir2/00manifest.i |
|
257 | 257 | |
|
258 | 258 | Merge of two trees |
|
259 | 259 | |
|
260 | 260 | $ hg co 2 |
|
261 | 261 | 6 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
262 | 262 | $ hg merge 1 |
|
263 | 263 | 3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
264 | 264 | (branch merge, don't forget to commit) |
|
265 | 265 | $ hg ci -m 'merge of flat manifests to new tree manifest' |
|
266 | 266 | created new head |
|
267 | 267 | $ hg diff -r 3 |
|
268 | 268 | |
|
269 | 269 | Parent of tree root manifest should be flat manifest, and two for merge |
|
270 | 270 | |
|
271 | 271 | $ hg debugindex -m |
|
272 | 272 | rev offset length delta linkrev nodeid p1 p2 |
|
273 | 273 | 0 0 80 -1 0 40536115ed9e 000000000000 000000000000 |
|
274 | 274 | 1 80 83 0 1 f3376063c255 40536115ed9e 000000000000 |
|
275 | 275 | 2 163 89 0 2 5d9b9da231a2 40536115ed9e 000000000000 |
|
276 | 276 | 3 252 83 2 3 d17d663cbd8a 5d9b9da231a2 f3376063c255 |
|
277 | 277 | 4 335 124 1 4 51e32a8c60ee f3376063c255 000000000000 |
|
278 | 278 | 5 459 126 2 5 cc5baa78b230 5d9b9da231a2 f3376063c255 |
|
279 | 279 | |
|
280 | 280 | |
|
281 | 281 | Status across flat/tree boundary should work |
|
282 | 282 | |
|
283 | 283 | $ hg status --rev '.^' --rev . |
|
284 | 284 | M a |
|
285 | 285 | M dir1/a |
|
286 | 286 | M dir1/dir1/a |
|
287 | 287 | |
|
288 | 288 | |
|
289 | 289 | Turning off treemanifest config has no effect |
|
290 | 290 | |
|
291 | 291 | $ hg debugindex --dir dir1 |
|
292 | 292 | rev offset length delta linkrev nodeid p1 p2 |
|
293 | 293 | 0 0 127 -1 4 064927a0648a 000000000000 000000000000 |
|
294 | 294 | 1 127 111 0 5 25ecb8cb8618 000000000000 000000000000 |
|
295 | 295 | $ echo 2 > dir1/a |
|
296 | 296 | $ hg --config experimental.treemanifest=False ci -qm 'modify dir1/a' |
|
297 | 297 | $ hg debugindex --dir dir1 |
|
298 | 298 | rev offset length delta linkrev nodeid p1 p2 |
|
299 | 299 | 0 0 127 -1 4 064927a0648a 000000000000 000000000000 |
|
300 | 300 | 1 127 111 0 5 25ecb8cb8618 000000000000 000000000000 |
|
301 | 301 | 2 238 55 1 6 5b16163a30c6 25ecb8cb8618 000000000000 |
|
302 | 302 | |
|
303 | 303 | Stripping and recovering changes should work |
|
304 | 304 | |
|
305 | 305 | $ hg st --change tip |
|
306 | 306 | M dir1/a |
|
307 | 307 | $ hg --config extensions.strip= strip tip |
|
308 | 308 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
309 | 309 | saved backup bundle to $TESTTMP/repo-mixed/.hg/strip-backup/51cfd7b1e13b-78a2f3ed-backup.hg (glob) |
|
310 | 310 | $ hg unbundle -q .hg/strip-backup/* |
|
311 | 311 | $ hg st --change tip |
|
312 | 312 | M dir1/a |
|
313 | 313 | |
|
314 | 314 | Shelving and unshelving should work |
|
315 | 315 | |
|
316 | 316 | $ echo foo >> dir1/a |
|
317 | 317 | $ hg --config extensions.shelve= shelve |
|
318 | 318 | shelved as default |
|
319 | 319 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
320 | 320 | $ hg --config extensions.shelve= unshelve |
|
321 | 321 | unshelving change 'default' |
|
322 | 322 | $ hg diff --nodates |
|
323 | 323 | diff -r 708a273da119 dir1/a |
|
324 | 324 | --- a/dir1/a |
|
325 | 325 | +++ b/dir1/a |
|
326 | 326 | @@ -1,1 +1,2 @@ |
|
327 | 327 | 1 |
|
328 | 328 | +foo |
|
329 | 329 | |
|
330 | 330 | Pushing from treemanifest repo to an empty repo makes that a treemanifest repo |
|
331 | 331 | |
|
332 | 332 | $ cd .. |
|
333 | 333 | $ hg init empty-repo |
|
334 | 334 | $ cat << EOF >> empty-repo/.hg/hgrc |
|
335 | 335 | > [experimental] |
|
336 | 336 | > changegroup3=yes |
|
337 | 337 | > EOF |
|
338 | 338 | $ grep treemanifest empty-repo/.hg/requires |
|
339 | 339 | [1] |
|
340 | 340 | $ hg push -R repo -r 0 empty-repo |
|
341 | 341 | pushing to empty-repo |
|
342 | 342 | searching for changes |
|
343 | 343 | adding changesets |
|
344 | 344 | adding manifests |
|
345 | 345 | adding file changes |
|
346 | 346 | added 1 changesets with 2 changes to 2 files |
|
347 | 347 | $ grep treemanifest empty-repo/.hg/requires |
|
348 | 348 | treemanifest |
|
349 | 349 | |
|
350 | 350 | Pushing to an empty repo works |
|
351 | 351 | |
|
352 | 352 | $ hg --config experimental.treemanifest=1 init clone |
|
353 | 353 | $ grep treemanifest clone/.hg/requires |
|
354 | 354 | treemanifest |
|
355 | 355 | $ hg push -R repo clone |
|
356 | 356 | pushing to clone |
|
357 | 357 | searching for changes |
|
358 | 358 | adding changesets |
|
359 | 359 | adding manifests |
|
360 | 360 | adding file changes |
|
361 | 361 | added 11 changesets with 15 changes to 10 files (+3 heads) |
|
362 | 362 | $ grep treemanifest clone/.hg/requires |
|
363 | 363 | treemanifest |
|
364 | 364 | |
|
365 | 365 | Create deeper repo with tree manifests. |
|
366 | 366 | |
|
367 | 367 | $ hg --config experimental.treemanifest=True init deeprepo |
|
368 | 368 | $ cd deeprepo |
|
369 | 369 | |
|
370 | 370 | $ mkdir .A |
|
371 | 371 | $ mkdir b |
|
372 | 372 | $ mkdir b/bar |
|
373 | 373 | $ mkdir b/bar/orange |
|
374 | 374 | $ mkdir b/bar/orange/fly |
|
375 | 375 | $ mkdir b/foo |
|
376 | 376 | $ mkdir b/foo/apple |
|
377 | 377 | $ mkdir b/foo/apple/bees |
|
378 | 378 | |
|
379 | 379 | $ touch .A/one.txt |
|
380 | 380 | $ touch .A/two.txt |
|
381 | 381 | $ touch b/bar/fruits.txt |
|
382 | 382 | $ touch b/bar/orange/fly/gnat.py |
|
383 | 383 | $ touch b/bar/orange/fly/housefly.txt |
|
384 | 384 | $ touch b/foo/apple/bees/flower.py |
|
385 | 385 | $ touch c.txt |
|
386 | 386 | $ touch d.py |
|
387 | 387 | |
|
388 | 388 | $ hg ci -Aqm 'initial' |
|
389 | 389 | |
|
390 | 390 | We'll see that visitdir works by removing some treemanifest revlogs and running |
|
391 | 391 | the files command with various parameters. |
|
392 | 392 | |
|
393 | 393 | Test files from the root. |
|
394 | 394 | |
|
395 | 395 | $ hg files -r . |
|
396 | 396 | .A/one.txt (glob) |
|
397 | 397 | .A/two.txt (glob) |
|
398 | 398 | b/bar/fruits.txt (glob) |
|
399 | 399 | b/bar/orange/fly/gnat.py (glob) |
|
400 | 400 | b/bar/orange/fly/housefly.txt (glob) |
|
401 | 401 | b/foo/apple/bees/flower.py (glob) |
|
402 | 402 | c.txt |
|
403 | 403 | d.py |
|
404 | 404 | |
|
405 | 405 | Excludes with a glob should not exclude everything from the glob's root |
|
406 | 406 | |
|
407 | 407 | $ hg files -r . -X 'b/fo?' b |
|
408 | 408 | b/bar/fruits.txt (glob) |
|
409 | 409 | b/bar/orange/fly/gnat.py (glob) |
|
410 | 410 | b/bar/orange/fly/housefly.txt (glob) |
|
411 | 411 | $ cp -r .hg/store .hg/store-copy |
|
412 | 412 | |
|
413 | 413 | Test files for a subdirectory. |
|
414 | 414 | |
|
415 | 415 | $ rm -r .hg/store/meta/~2e_a |
|
416 | 416 | $ hg files -r . b |
|
417 | 417 | b/bar/fruits.txt (glob) |
|
418 | 418 | b/bar/orange/fly/gnat.py (glob) |
|
419 | 419 | b/bar/orange/fly/housefly.txt (glob) |
|
420 | 420 | b/foo/apple/bees/flower.py (glob) |
|
421 |
$ cp -r |
|
|
421 | $ cp -r .hg/store-copy/* .hg/store | |
|
422 | 422 | |
|
423 | 423 | Test files with just includes and excludes. |
|
424 | 424 | |
|
425 | 425 | $ rm -r .hg/store/meta/~2e_a |
|
426 | 426 | $ rm -r .hg/store/meta/b/bar/orange/fly |
|
427 | 427 | $ rm -r .hg/store/meta/b/foo/apple/bees |
|
428 | 428 | $ hg files -r . -I path:b/bar -X path:b/bar/orange/fly -I path:b/foo -X path:b/foo/apple/bees |
|
429 | 429 | b/bar/fruits.txt (glob) |
|
430 |
$ cp -r |
|
|
430 | $ cp -r .hg/store-copy/* .hg/store | |
|
431 | 431 | |
|
432 | 432 | Test files for a subdirectory, excluding a directory within it. |
|
433 | 433 | |
|
434 | 434 | $ rm -r .hg/store/meta/~2e_a |
|
435 | 435 | $ rm -r .hg/store/meta/b/foo |
|
436 | 436 | $ hg files -r . -X path:b/foo b |
|
437 | 437 | b/bar/fruits.txt (glob) |
|
438 | 438 | b/bar/orange/fly/gnat.py (glob) |
|
439 | 439 | b/bar/orange/fly/housefly.txt (glob) |
|
440 |
$ cp -r |
|
|
440 | $ cp -r .hg/store-copy/* .hg/store | |
|
441 | 441 | |
|
442 | 442 | Test files for a sub directory, including only a directory within it, and |
|
443 | 443 | including an unrelated directory. |
|
444 | 444 | |
|
445 | 445 | $ rm -r .hg/store/meta/~2e_a |
|
446 | 446 | $ rm -r .hg/store/meta/b/foo |
|
447 | 447 | $ hg files -r . -I path:b/bar/orange -I path:a b |
|
448 | 448 | b/bar/orange/fly/gnat.py (glob) |
|
449 | 449 | b/bar/orange/fly/housefly.txt (glob) |
|
450 |
$ cp -r |
|
|
450 | $ cp -r .hg/store-copy/* .hg/store | |
|
451 | 451 | |
|
452 | 452 | Test files for a pattern, including a directory, and excluding a directory |
|
453 | 453 | within that. |
|
454 | 454 | |
|
455 | 455 | $ rm -r .hg/store/meta/~2e_a |
|
456 | 456 | $ rm -r .hg/store/meta/b/foo |
|
457 | 457 | $ rm -r .hg/store/meta/b/bar/orange |
|
458 | 458 | $ hg files -r . glob:**.txt -I path:b/bar -X path:b/bar/orange |
|
459 | 459 | b/bar/fruits.txt (glob) |
|
460 |
$ cp -r |
|
|
460 | $ cp -r .hg/store-copy/* .hg/store | |
|
461 | 461 | |
|
462 | 462 | Add some more changes to the deep repo |
|
463 | 463 | $ echo narf >> b/bar/fruits.txt |
|
464 | 464 | $ hg ci -m narf |
|
465 | 465 | $ echo troz >> b/bar/orange/fly/gnat.py |
|
466 | 466 | $ hg ci -m troz |
|
467 | 467 | |
|
468 | 468 | Verify works |
|
469 | 469 | $ hg verify |
|
470 | 470 | checking changesets |
|
471 | 471 | checking manifests |
|
472 | 472 | crosschecking files in changesets and manifests |
|
473 | 473 | checking files |
|
474 | 474 | 8 files, 3 changesets, 10 total revisions |
|
475 | 475 | |
|
476 | 476 | Dirlogs are included in fncache |
|
477 | 477 | $ grep meta/.A/00manifest.i .hg/store/fncache |
|
478 | 478 | meta/.A/00manifest.i |
|
479 | 479 | |
|
480 | 480 | Rebuilt fncache includes dirlogs |
|
481 | 481 | $ rm .hg/store/fncache |
|
482 | 482 | $ hg debugrebuildfncache |
|
483 | 483 | adding data/.A/one.txt.i |
|
484 | 484 | adding data/.A/two.txt.i |
|
485 | 485 | adding data/b/bar/fruits.txt.i |
|
486 | 486 | adding data/b/bar/orange/fly/gnat.py.i |
|
487 | 487 | adding data/b/bar/orange/fly/housefly.txt.i |
|
488 | 488 | adding data/b/foo/apple/bees/flower.py.i |
|
489 | 489 | adding data/c.txt.i |
|
490 | 490 | adding data/d.py.i |
|
491 | 491 | adding meta/.A/00manifest.i |
|
492 | 492 | adding meta/b/00manifest.i |
|
493 | 493 | adding meta/b/bar/00manifest.i |
|
494 | 494 | adding meta/b/bar/orange/00manifest.i |
|
495 | 495 | adding meta/b/bar/orange/fly/00manifest.i |
|
496 | 496 | adding meta/b/foo/00manifest.i |
|
497 | 497 | adding meta/b/foo/apple/00manifest.i |
|
498 | 498 | adding meta/b/foo/apple/bees/00manifest.i |
|
499 | 499 | 16 items added, 0 removed from fncache |
|
500 | 500 | |
|
501 | 501 | Test cloning a treemanifest repo over http. |
|
502 | 502 | $ hg serve -p $HGPORT2 -d --pid-file=hg.pid --errorlog=errors.log |
|
503 | 503 | $ cat hg.pid >> $DAEMON_PIDS |
|
504 | 504 | $ cd .. |
|
505 | 505 | We can clone even with the knob turned off and we'll get a treemanifest repo. |
|
506 | 506 | $ hg clone --config experimental.treemanifest=False \ |
|
507 | 507 | > --config experimental.changegroup3=True \ |
|
508 | 508 | > http://localhost:$HGPORT2 deepclone |
|
509 | 509 | requesting all changes |
|
510 | 510 | adding changesets |
|
511 | 511 | adding manifests |
|
512 | 512 | adding file changes |
|
513 | 513 | added 3 changesets with 10 changes to 8 files |
|
514 | 514 | updating to branch default |
|
515 | 515 | 8 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
516 | 516 | No server errors. |
|
517 | 517 | $ cat deeprepo/errors.log |
|
518 | 518 | requires got updated to include treemanifest |
|
519 | 519 | $ cat deepclone/.hg/requires | grep treemanifest |
|
520 | 520 | treemanifest |
|
521 | 521 | Tree manifest revlogs exist. |
|
522 | 522 | $ find deepclone/.hg/store/meta | sort |
|
523 | 523 | deepclone/.hg/store/meta |
|
524 | 524 | deepclone/.hg/store/meta/b |
|
525 | 525 | deepclone/.hg/store/meta/b/00manifest.i |
|
526 | 526 | deepclone/.hg/store/meta/b/bar |
|
527 | 527 | deepclone/.hg/store/meta/b/bar/00manifest.i |
|
528 | 528 | deepclone/.hg/store/meta/b/bar/orange |
|
529 | 529 | deepclone/.hg/store/meta/b/bar/orange/00manifest.i |
|
530 | 530 | deepclone/.hg/store/meta/b/bar/orange/fly |
|
531 | 531 | deepclone/.hg/store/meta/b/bar/orange/fly/00manifest.i |
|
532 | 532 | deepclone/.hg/store/meta/b/foo |
|
533 | 533 | deepclone/.hg/store/meta/b/foo/00manifest.i |
|
534 | 534 | deepclone/.hg/store/meta/b/foo/apple |
|
535 | 535 | deepclone/.hg/store/meta/b/foo/apple/00manifest.i |
|
536 | 536 | deepclone/.hg/store/meta/b/foo/apple/bees |
|
537 | 537 | deepclone/.hg/store/meta/b/foo/apple/bees/00manifest.i |
|
538 | 538 | deepclone/.hg/store/meta/~2e_a |
|
539 | 539 | deepclone/.hg/store/meta/~2e_a/00manifest.i |
|
540 | 540 | Verify passes. |
|
541 | 541 | $ cd deepclone |
|
542 | 542 | $ hg verify |
|
543 | 543 | checking changesets |
|
544 | 544 | checking manifests |
|
545 | 545 | crosschecking files in changesets and manifests |
|
546 | 546 | checking files |
|
547 | 547 | 8 files, 3 changesets, 10 total revisions |
|
548 | 548 | $ cd .. |
|
549 | 549 | |
|
550 | 550 | Create clones using old repo formats to use in later tests |
|
551 | 551 | $ hg clone --config format.usestore=False \ |
|
552 | 552 | > --config experimental.changegroup3=True \ |
|
553 | 553 | > http://localhost:$HGPORT2 deeprepo-basicstore |
|
554 | 554 | requesting all changes |
|
555 | 555 | adding changesets |
|
556 | 556 | adding manifests |
|
557 | 557 | adding file changes |
|
558 | 558 | added 3 changesets with 10 changes to 8 files |
|
559 | 559 | updating to branch default |
|
560 | 560 | 8 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
561 | 561 | $ cd deeprepo-basicstore |
|
562 | 562 | $ grep store .hg/requires |
|
563 | 563 | [1] |
|
564 | 564 | $ hg serve -p $HGPORT3 -d --pid-file=hg.pid --errorlog=errors.log |
|
565 | 565 | $ cat hg.pid >> $DAEMON_PIDS |
|
566 | 566 | $ cd .. |
|
567 | 567 | $ hg clone --config format.usefncache=False \ |
|
568 | 568 | > --config experimental.changegroup3=True \ |
|
569 | 569 | > http://localhost:$HGPORT2 deeprepo-encodedstore |
|
570 | 570 | requesting all changes |
|
571 | 571 | adding changesets |
|
572 | 572 | adding manifests |
|
573 | 573 | adding file changes |
|
574 | 574 | added 3 changesets with 10 changes to 8 files |
|
575 | 575 | updating to branch default |
|
576 | 576 | 8 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
577 | 577 | $ cd deeprepo-encodedstore |
|
578 | 578 | $ grep fncache .hg/requires |
|
579 | 579 | [1] |
|
580 | 580 | $ hg serve -p $HGPORT4 -d --pid-file=hg.pid --errorlog=errors.log |
|
581 | 581 | $ cat hg.pid >> $DAEMON_PIDS |
|
582 | 582 | $ cd .. |
|
583 | 583 | |
|
584 | 584 | Local clone with basicstore |
|
585 | 585 | $ hg clone -U deeprepo-basicstore local-clone-basicstore |
|
586 | 586 | $ hg -R local-clone-basicstore verify |
|
587 | 587 | checking changesets |
|
588 | 588 | checking manifests |
|
589 | 589 | crosschecking files in changesets and manifests |
|
590 | 590 | checking files |
|
591 | 591 | 8 files, 3 changesets, 10 total revisions |
|
592 | 592 | |
|
593 | 593 | Local clone with encodedstore |
|
594 | 594 | $ hg clone -U deeprepo-encodedstore local-clone-encodedstore |
|
595 | 595 | $ hg -R local-clone-encodedstore verify |
|
596 | 596 | checking changesets |
|
597 | 597 | checking manifests |
|
598 | 598 | crosschecking files in changesets and manifests |
|
599 | 599 | checking files |
|
600 | 600 | 8 files, 3 changesets, 10 total revisions |
|
601 | 601 | |
|
602 | 602 | Local clone with fncachestore |
|
603 | 603 | $ hg clone -U deeprepo local-clone-fncachestore |
|
604 | 604 | $ hg -R local-clone-fncachestore verify |
|
605 | 605 | checking changesets |
|
606 | 606 | checking manifests |
|
607 | 607 | crosschecking files in changesets and manifests |
|
608 | 608 | checking files |
|
609 | 609 | 8 files, 3 changesets, 10 total revisions |
|
610 | 610 | |
|
611 | 611 | Stream clone with basicstore |
|
612 | 612 | $ hg clone --config experimental.changegroup3=True --uncompressed -U \ |
|
613 | 613 | > http://localhost:$HGPORT3 stream-clone-basicstore |
|
614 | 614 | streaming all changes |
|
615 | 615 | 18 files to transfer, * of data (glob) |
|
616 | 616 | transferred * in * seconds (*) (glob) |
|
617 | 617 | searching for changes |
|
618 | 618 | no changes found |
|
619 | 619 | $ hg -R stream-clone-basicstore verify |
|
620 | 620 | checking changesets |
|
621 | 621 | checking manifests |
|
622 | 622 | crosschecking files in changesets and manifests |
|
623 | 623 | checking files |
|
624 | 624 | 8 files, 3 changesets, 10 total revisions |
|
625 | 625 | |
|
626 | 626 | Stream clone with encodedstore |
|
627 | 627 | $ hg clone --config experimental.changegroup3=True --uncompressed -U \ |
|
628 | 628 | > http://localhost:$HGPORT4 stream-clone-encodedstore |
|
629 | 629 | streaming all changes |
|
630 | 630 | 18 files to transfer, * of data (glob) |
|
631 | 631 | transferred * in * seconds (*) (glob) |
|
632 | 632 | searching for changes |
|
633 | 633 | no changes found |
|
634 | 634 | $ hg -R stream-clone-encodedstore verify |
|
635 | 635 | checking changesets |
|
636 | 636 | checking manifests |
|
637 | 637 | crosschecking files in changesets and manifests |
|
638 | 638 | checking files |
|
639 | 639 | 8 files, 3 changesets, 10 total revisions |
|
640 | 640 | |
|
641 | 641 | Stream clone with fncachestore |
|
642 | 642 | $ hg clone --config experimental.changegroup3=True --uncompressed -U \ |
|
643 | 643 | > http://localhost:$HGPORT2 stream-clone-fncachestore |
|
644 | 644 | streaming all changes |
|
645 | 645 | 18 files to transfer, * of data (glob) |
|
646 | 646 | transferred * in * seconds (*) (glob) |
|
647 | 647 | searching for changes |
|
648 | 648 | no changes found |
|
649 | 649 | $ hg -R stream-clone-fncachestore verify |
|
650 | 650 | checking changesets |
|
651 | 651 | checking manifests |
|
652 | 652 | crosschecking files in changesets and manifests |
|
653 | 653 | checking files |
|
654 | 654 | 8 files, 3 changesets, 10 total revisions |
|
655 | 655 | |
|
656 | 656 | Packed bundle |
|
657 | 657 | $ hg -R deeprepo debugcreatestreamclonebundle repo-packed.hg |
|
658 | 658 | writing 3349 bytes for 18 files |
|
659 | 659 | bundle requirements: generaldelta, revlogv1, treemanifest |
|
660 | 660 | $ hg debugbundle --spec repo-packed.hg |
|
661 | 661 | none-packed1;requirements%3Dgeneraldelta%2Crevlogv1%2Ctreemanifest |
General Comments 0
You need to be logged in to leave comments.
Login now