##// END OF EJS Templates
tests: conditionalize test-treemanifest.t...
Gregory Szorc -
r37450:28ee8b28 default
parent child Browse files
Show More
@@ -1,878 +1,908 b''
1 #require killdaemons
1 #require killdaemons
2
2
3 $ cat << EOF >> $HGRCPATH
3 $ cat << EOF >> $HGRCPATH
4 > [ui]
4 > [ui]
5 > ssh=$PYTHON "$TESTDIR/dummyssh"
5 > ssh=$PYTHON "$TESTDIR/dummyssh"
6 > EOF
6 > EOF
7
7
8 Set up repo
8 Set up repo
9
9
10 $ hg --config experimental.treemanifest=True init repo
10 $ hg --config experimental.treemanifest=True init repo
11 $ cd repo
11 $ cd repo
12
12
13 Requirements get set on init
13 Requirements get set on init
14
14
15 $ grep treemanifest .hg/requires
15 $ grep treemanifest .hg/requires
16 treemanifest
16 treemanifest
17
17
18 Without directories, looks like any other repo
18 Without directories, looks like any other repo
19
19
20 $ echo 0 > a
20 $ echo 0 > a
21 $ echo 0 > b
21 $ echo 0 > b
22 $ hg ci -Aqm initial
22 $ hg ci -Aqm initial
23 $ hg debugdata -m 0
23 $ hg debugdata -m 0
24 a\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (esc)
24 a\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (esc)
25 b\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (esc)
25 b\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (esc)
26
26
27 Submanifest is stored in separate revlog
27 Submanifest is stored in separate revlog
28
28
29 $ mkdir dir1
29 $ mkdir dir1
30 $ echo 1 > dir1/a
30 $ echo 1 > dir1/a
31 $ echo 1 > dir1/b
31 $ echo 1 > dir1/b
32 $ echo 1 > e
32 $ echo 1 > e
33 $ hg ci -Aqm 'add dir1'
33 $ hg ci -Aqm 'add dir1'
34 $ hg debugdata -m 1
34 $ hg debugdata -m 1
35 a\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (esc)
35 a\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (esc)
36 b\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (esc)
36 b\x00362fef284ce2ca02aecc8de6d5e8a1c3af0556fe (esc)
37 dir1\x008b3ffd73f901e83304c83d33132c8e774ceac44et (esc)
37 dir1\x008b3ffd73f901e83304c83d33132c8e774ceac44et (esc)
38 e\x00b8e02f6433738021a065f94175c7cd23db5f05be (esc)
38 e\x00b8e02f6433738021a065f94175c7cd23db5f05be (esc)
39 $ hg debugdata --dir dir1 0
39 $ hg debugdata --dir dir1 0
40 a\x00b8e02f6433738021a065f94175c7cd23db5f05be (esc)
40 a\x00b8e02f6433738021a065f94175c7cd23db5f05be (esc)
41 b\x00b8e02f6433738021a065f94175c7cd23db5f05be (esc)
41 b\x00b8e02f6433738021a065f94175c7cd23db5f05be (esc)
42
42
43 Can add nested directories
43 Can add nested directories
44
44
45 $ mkdir dir1/dir1
45 $ mkdir dir1/dir1
46 $ echo 2 > dir1/dir1/a
46 $ echo 2 > dir1/dir1/a
47 $ echo 2 > dir1/dir1/b
47 $ echo 2 > dir1/dir1/b
48 $ mkdir dir1/dir2
48 $ mkdir dir1/dir2
49 $ echo 2 > dir1/dir2/a
49 $ echo 2 > dir1/dir2/a
50 $ echo 2 > dir1/dir2/b
50 $ echo 2 > dir1/dir2/b
51 $ hg ci -Aqm 'add dir1/dir1'
51 $ hg ci -Aqm 'add dir1/dir1'
52 $ hg files -r .
52 $ hg files -r .
53 a
53 a
54 b
54 b
55 dir1/a
55 dir1/a
56 dir1/b
56 dir1/b
57 dir1/dir1/a
57 dir1/dir1/a
58 dir1/dir1/b
58 dir1/dir1/b
59 dir1/dir2/a
59 dir1/dir2/a
60 dir1/dir2/b
60 dir1/dir2/b
61 e
61 e
62
62
63 The manifest command works
63 The manifest command works
64
64
65 $ hg manifest
65 $ hg manifest
66 a
66 a
67 b
67 b
68 dir1/a
68 dir1/a
69 dir1/b
69 dir1/b
70 dir1/dir1/a
70 dir1/dir1/a
71 dir1/dir1/b
71 dir1/dir1/b
72 dir1/dir2/a
72 dir1/dir2/a
73 dir1/dir2/b
73 dir1/dir2/b
74 e
74 e
75
75
76 Revision is not created for unchanged directory
76 Revision is not created for unchanged directory
77
77
78 $ mkdir dir2
78 $ mkdir dir2
79 $ echo 3 > dir2/a
79 $ echo 3 > dir2/a
80 $ hg add dir2
80 $ hg add dir2
81 adding dir2/a
81 adding dir2/a
82 $ hg debugindex --dir dir1 > before
82 $ hg debugindex --dir dir1 > before
83 $ hg ci -qm 'add dir2'
83 $ hg ci -qm 'add dir2'
84 $ hg debugindex --dir dir1 > after
84 $ hg debugindex --dir dir1 > after
85 $ diff before after
85 $ diff before after
86 $ rm before after
86 $ rm before after
87
87
88 Removing directory does not create an revlog entry
88 Removing directory does not create an revlog entry
89
89
90 $ hg rm dir1/dir1
90 $ hg rm dir1/dir1
91 removing dir1/dir1/a
91 removing dir1/dir1/a
92 removing dir1/dir1/b
92 removing dir1/dir1/b
93 $ hg debugindex --dir dir1/dir1 > before
93 $ hg debugindex --dir dir1/dir1 > before
94 $ hg ci -qm 'remove dir1/dir1'
94 $ hg ci -qm 'remove dir1/dir1'
95 $ hg debugindex --dir dir1/dir1 > after
95 $ hg debugindex --dir dir1/dir1 > after
96 $ diff before after
96 $ diff before after
97 $ rm before after
97 $ rm before after
98
98
99 Check that hg files (calls treemanifest.walk()) works
99 Check that hg files (calls treemanifest.walk()) works
100 without loading all directory revlogs
100 without loading all directory revlogs
101
101
102 $ hg co 'desc("add dir2")'
102 $ hg co 'desc("add dir2")'
103 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
103 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
104 $ mv .hg/store/meta/dir2 .hg/store/meta/dir2-backup
104 $ mv .hg/store/meta/dir2 .hg/store/meta/dir2-backup
105 $ hg files -r . dir1
105 $ hg files -r . dir1
106 dir1/a
106 dir1/a
107 dir1/b
107 dir1/b
108 dir1/dir1/a
108 dir1/dir1/a
109 dir1/dir1/b
109 dir1/dir1/b
110 dir1/dir2/a
110 dir1/dir2/a
111 dir1/dir2/b
111 dir1/dir2/b
112
112
113 Check that status between revisions works (calls treemanifest.matches())
113 Check that status between revisions works (calls treemanifest.matches())
114 without loading all directory revlogs
114 without loading all directory revlogs
115
115
116 $ hg status --rev 'desc("add dir1")' --rev . dir1
116 $ hg status --rev 'desc("add dir1")' --rev . dir1
117 A dir1/dir1/a
117 A dir1/dir1/a
118 A dir1/dir1/b
118 A dir1/dir1/b
119 A dir1/dir2/a
119 A dir1/dir2/a
120 A dir1/dir2/b
120 A dir1/dir2/b
121 $ mv .hg/store/meta/dir2-backup .hg/store/meta/dir2
121 $ mv .hg/store/meta/dir2-backup .hg/store/meta/dir2
122
122
123 Merge creates 2-parent revision of directory revlog
123 Merge creates 2-parent revision of directory revlog
124
124
125 $ echo 5 > dir1/a
125 $ echo 5 > dir1/a
126 $ hg ci -Aqm 'modify dir1/a'
126 $ hg ci -Aqm 'modify dir1/a'
127 $ hg co '.^'
127 $ hg co '.^'
128 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
128 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
129 $ echo 6 > dir1/b
129 $ echo 6 > dir1/b
130 $ hg ci -Aqm 'modify dir1/b'
130 $ hg ci -Aqm 'modify dir1/b'
131 $ hg merge 'desc("modify dir1/a")'
131 $ hg merge 'desc("modify dir1/a")'
132 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
132 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
133 (branch merge, don't forget to commit)
133 (branch merge, don't forget to commit)
134 $ hg ci -m 'conflict-free merge involving dir1/'
134 $ hg ci -m 'conflict-free merge involving dir1/'
135 $ cat dir1/a
135 $ cat dir1/a
136 5
136 5
137 $ cat dir1/b
137 $ cat dir1/b
138 6
138 6
139 $ hg debugindex --dir dir1
139 $ hg debugindex --dir dir1
140 rev linkrev nodeid p1 p2
140 rev linkrev nodeid p1 p2
141 0 1 8b3ffd73f901 000000000000 000000000000
141 0 1 8b3ffd73f901 000000000000 000000000000
142 1 2 68e9d057c5a8 8b3ffd73f901 000000000000
142 1 2 68e9d057c5a8 8b3ffd73f901 000000000000
143 2 4 4698198d2624 68e9d057c5a8 000000000000
143 2 4 4698198d2624 68e9d057c5a8 000000000000
144 3 5 44844058ccce 68e9d057c5a8 000000000000
144 3 5 44844058ccce 68e9d057c5a8 000000000000
145 4 6 bf3d9b744927 68e9d057c5a8 000000000000
145 4 6 bf3d9b744927 68e9d057c5a8 000000000000
146 5 7 dde7c0af2a03 bf3d9b744927 44844058ccce
146 5 7 dde7c0af2a03 bf3d9b744927 44844058ccce
147
147
148 Merge keeping directory from parent 1 does not create revlog entry. (Note that
148 Merge keeping directory from parent 1 does not create revlog entry. (Note that
149 dir1's manifest does change, but only because dir1/a's filelog changes.)
149 dir1's manifest does change, but only because dir1/a's filelog changes.)
150
150
151 $ hg co 'desc("add dir2")'
151 $ hg co 'desc("add dir2")'
152 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
152 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
153 $ echo 8 > dir2/a
153 $ echo 8 > dir2/a
154 $ hg ci -m 'modify dir2/a'
154 $ hg ci -m 'modify dir2/a'
155 created new head
155 created new head
156
156
157 $ hg debugindex --dir dir2 > before
157 $ hg debugindex --dir dir2 > before
158 $ hg merge 'desc("modify dir1/a")'
158 $ hg merge 'desc("modify dir1/a")'
159 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
159 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
160 (branch merge, don't forget to commit)
160 (branch merge, don't forget to commit)
161 $ hg revert -r 'desc("modify dir2/a")' .
161 $ hg revert -r 'desc("modify dir2/a")' .
162 reverting dir1/a
162 reverting dir1/a
163 $ hg ci -m 'merge, keeping parent 1'
163 $ hg ci -m 'merge, keeping parent 1'
164 $ hg debugindex --dir dir2 > after
164 $ hg debugindex --dir dir2 > after
165 $ diff before after
165 $ diff before after
166 $ rm before after
166 $ rm before after
167
167
168 Merge keeping directory from parent 2 does not create revlog entry. (Note that
168 Merge keeping directory from parent 2 does not create revlog entry. (Note that
169 dir2's manifest does change, but only because dir2/a's filelog changes.)
169 dir2's manifest does change, but only because dir2/a's filelog changes.)
170
170
171 $ hg co 'desc("modify dir2/a")'
171 $ hg co 'desc("modify dir2/a")'
172 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
172 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
173 $ hg debugindex --dir dir1 > before
173 $ hg debugindex --dir dir1 > before
174 $ hg merge 'desc("modify dir1/a")'
174 $ hg merge 'desc("modify dir1/a")'
175 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
175 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
176 (branch merge, don't forget to commit)
176 (branch merge, don't forget to commit)
177 $ hg revert -r 'desc("modify dir1/a")' .
177 $ hg revert -r 'desc("modify dir1/a")' .
178 reverting dir2/a
178 reverting dir2/a
179 $ hg ci -m 'merge, keeping parent 2'
179 $ hg ci -m 'merge, keeping parent 2'
180 created new head
180 created new head
181 $ hg debugindex --dir dir1 > after
181 $ hg debugindex --dir dir1 > after
182 $ diff before after
182 $ diff before after
183 $ rm before after
183 $ rm before after
184
184
185 Create flat source repo for tests with mixed flat/tree manifests
185 Create flat source repo for tests with mixed flat/tree manifests
186
186
187 $ cd ..
187 $ cd ..
188 $ hg init repo-flat
188 $ hg init repo-flat
189 $ cd repo-flat
189 $ cd repo-flat
190
190
191 Create a few commits with flat manifest
191 Create a few commits with flat manifest
192
192
193 $ echo 0 > a
193 $ echo 0 > a
194 $ echo 0 > b
194 $ echo 0 > b
195 $ echo 0 > e
195 $ echo 0 > e
196 $ for d in dir1 dir1/dir1 dir1/dir2 dir2
196 $ for d in dir1 dir1/dir1 dir1/dir2 dir2
197 > do
197 > do
198 > mkdir $d
198 > mkdir $d
199 > echo 0 > $d/a
199 > echo 0 > $d/a
200 > echo 0 > $d/b
200 > echo 0 > $d/b
201 > done
201 > done
202 $ hg ci -Aqm initial
202 $ hg ci -Aqm initial
203
203
204 $ echo 1 > a
204 $ echo 1 > a
205 $ echo 1 > dir1/a
205 $ echo 1 > dir1/a
206 $ echo 1 > dir1/dir1/a
206 $ echo 1 > dir1/dir1/a
207 $ hg ci -Aqm 'modify on branch 1'
207 $ hg ci -Aqm 'modify on branch 1'
208
208
209 $ hg co 0
209 $ hg co 0
210 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
210 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
211 $ echo 2 > b
211 $ echo 2 > b
212 $ echo 2 > dir1/b
212 $ echo 2 > dir1/b
213 $ echo 2 > dir1/dir1/b
213 $ echo 2 > dir1/dir1/b
214 $ hg ci -Aqm 'modify on branch 2'
214 $ hg ci -Aqm 'modify on branch 2'
215
215
216 $ hg merge 1
216 $ hg merge 1
217 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
217 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
218 (branch merge, don't forget to commit)
218 (branch merge, don't forget to commit)
219 $ hg ci -m 'merge of flat manifests to new flat manifest'
219 $ hg ci -m 'merge of flat manifests to new flat manifest'
220
220
221 $ hg serve -p $HGPORT -d --pid-file=hg.pid --errorlog=errors.log
221 $ hg serve -p $HGPORT -d --pid-file=hg.pid --errorlog=errors.log
222 $ cat hg.pid >> $DAEMON_PIDS
222 $ cat hg.pid >> $DAEMON_PIDS
223
223
224 Create clone with tree manifests enabled
224 Create clone with tree manifests enabled
225
225
226 $ cd ..
226 $ cd ..
227 $ hg clone --config experimental.treemanifest=1 \
227 $ hg clone --config experimental.treemanifest=1 \
228 > http://localhost:$HGPORT repo-mixed -r 1
228 > http://localhost:$HGPORT repo-mixed -r 1
229 adding changesets
229 adding changesets
230 adding manifests
230 adding manifests
231 adding file changes
231 adding file changes
232 added 2 changesets with 14 changes to 11 files
232 added 2 changesets with 14 changes to 11 files
233 new changesets 5b02a3e8db7e:581ef6037d8b
233 new changesets 5b02a3e8db7e:581ef6037d8b
234 updating to branch default
234 updating to branch default
235 11 files updated, 0 files merged, 0 files removed, 0 files unresolved
235 11 files updated, 0 files merged, 0 files removed, 0 files unresolved
236 $ cd repo-mixed
236 $ cd repo-mixed
237 $ test -d .hg/store/meta
237 $ test -d .hg/store/meta
238 [1]
238 [1]
239 $ grep treemanifest .hg/requires
239 $ grep treemanifest .hg/requires
240 treemanifest
240 treemanifest
241
241
242 Should be possible to push updates from flat to tree manifest repo
242 Should be possible to push updates from flat to tree manifest repo
243
243
244 $ hg -R ../repo-flat push ssh://user@dummy/repo-mixed
244 $ hg -R ../repo-flat push ssh://user@dummy/repo-mixed
245 pushing to ssh://user@dummy/repo-mixed
245 pushing to ssh://user@dummy/repo-mixed
246 searching for changes
246 searching for changes
247 remote: adding changesets
247 remote: adding changesets
248 remote: adding manifests
248 remote: adding manifests
249 remote: adding file changes
249 remote: adding file changes
250 remote: added 2 changesets with 3 changes to 3 files
250 remote: added 2 changesets with 3 changes to 3 files
251
251
252 Commit should store revlog per directory
252 Commit should store revlog per directory
253
253
254 $ hg co 1
254 $ hg co 1
255 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
255 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
256 $ echo 3 > a
256 $ echo 3 > a
257 $ echo 3 > dir1/a
257 $ echo 3 > dir1/a
258 $ echo 3 > dir1/dir1/a
258 $ echo 3 > dir1/dir1/a
259 $ hg ci -m 'first tree'
259 $ hg ci -m 'first tree'
260 created new head
260 created new head
261 $ find .hg/store/meta | sort
261 $ find .hg/store/meta | sort
262 .hg/store/meta
262 .hg/store/meta
263 .hg/store/meta/dir1
263 .hg/store/meta/dir1
264 .hg/store/meta/dir1/00manifest.i
264 .hg/store/meta/dir1/00manifest.i
265 .hg/store/meta/dir1/dir1
265 .hg/store/meta/dir1/dir1
266 .hg/store/meta/dir1/dir1/00manifest.i
266 .hg/store/meta/dir1/dir1/00manifest.i
267 .hg/store/meta/dir1/dir2
267 .hg/store/meta/dir1/dir2
268 .hg/store/meta/dir1/dir2/00manifest.i
268 .hg/store/meta/dir1/dir2/00manifest.i
269 .hg/store/meta/dir2
269 .hg/store/meta/dir2
270 .hg/store/meta/dir2/00manifest.i
270 .hg/store/meta/dir2/00manifest.i
271
271
272 Merge of two trees
272 Merge of two trees
273
273
274 $ hg co 2
274 $ hg co 2
275 6 files updated, 0 files merged, 0 files removed, 0 files unresolved
275 6 files updated, 0 files merged, 0 files removed, 0 files unresolved
276 $ hg merge 1
276 $ hg merge 1
277 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
277 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
278 (branch merge, don't forget to commit)
278 (branch merge, don't forget to commit)
279 $ hg ci -m 'merge of flat manifests to new tree manifest'
279 $ hg ci -m 'merge of flat manifests to new tree manifest'
280 created new head
280 created new head
281 $ hg diff -r 3
281 $ hg diff -r 3
282
282
283 Parent of tree root manifest should be flat manifest, and two for merge
283 Parent of tree root manifest should be flat manifest, and two for merge
284
284
285 $ hg debugindex -m
285 $ hg debugindex -m
286 rev linkrev nodeid p1 p2
286 rev linkrev nodeid p1 p2
287 0 0 40536115ed9e 000000000000 000000000000
287 0 0 40536115ed9e 000000000000 000000000000
288 1 1 f3376063c255 40536115ed9e 000000000000
288 1 1 f3376063c255 40536115ed9e 000000000000
289 2 2 5d9b9da231a2 40536115ed9e 000000000000
289 2 2 5d9b9da231a2 40536115ed9e 000000000000
290 3 3 d17d663cbd8a 5d9b9da231a2 f3376063c255
290 3 3 d17d663cbd8a 5d9b9da231a2 f3376063c255
291 4 4 51e32a8c60ee f3376063c255 000000000000
291 4 4 51e32a8c60ee f3376063c255 000000000000
292 5 5 cc5baa78b230 5d9b9da231a2 f3376063c255
292 5 5 cc5baa78b230 5d9b9da231a2 f3376063c255
293
293
294
294
295 Status across flat/tree boundary should work
295 Status across flat/tree boundary should work
296
296
297 $ hg status --rev '.^' --rev .
297 $ hg status --rev '.^' --rev .
298 M a
298 M a
299 M dir1/a
299 M dir1/a
300 M dir1/dir1/a
300 M dir1/dir1/a
301
301
302
302
303 Turning off treemanifest config has no effect
303 Turning off treemanifest config has no effect
304
304
305 $ hg debugindex --dir dir1
305 $ hg debugindex --dir dir1
306 rev linkrev nodeid p1 p2
306 rev linkrev nodeid p1 p2
307 0 4 064927a0648a 000000000000 000000000000
307 0 4 064927a0648a 000000000000 000000000000
308 1 5 25ecb8cb8618 000000000000 000000000000
308 1 5 25ecb8cb8618 000000000000 000000000000
309 $ echo 2 > dir1/a
309 $ echo 2 > dir1/a
310 $ hg --config experimental.treemanifest=False ci -qm 'modify dir1/a'
310 $ hg --config experimental.treemanifest=False ci -qm 'modify dir1/a'
311 $ hg debugindex --dir dir1
311 $ hg debugindex --dir dir1
312 rev linkrev nodeid p1 p2
312 rev linkrev nodeid p1 p2
313 0 4 064927a0648a 000000000000 000000000000
313 0 4 064927a0648a 000000000000 000000000000
314 1 5 25ecb8cb8618 000000000000 000000000000
314 1 5 25ecb8cb8618 000000000000 000000000000
315 2 6 5b16163a30c6 25ecb8cb8618 000000000000
315 2 6 5b16163a30c6 25ecb8cb8618 000000000000
316
316
317 Stripping and recovering changes should work
317 Stripping and recovering changes should work
318
318
319 $ hg st --change tip
319 $ hg st --change tip
320 M dir1/a
320 M dir1/a
321 $ hg --config extensions.strip= strip tip
321 $ hg --config extensions.strip= strip tip
322 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
322 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
323 saved backup bundle to $TESTTMP/repo-mixed/.hg/strip-backup/51cfd7b1e13b-78a2f3ed-backup.hg
323 saved backup bundle to $TESTTMP/repo-mixed/.hg/strip-backup/51cfd7b1e13b-78a2f3ed-backup.hg
324 $ hg debugindex --dir dir1
324 $ hg debugindex --dir dir1
325 rev linkrev nodeid p1 p2
325 rev linkrev nodeid p1 p2
326 0 4 064927a0648a 000000000000 000000000000
326 0 4 064927a0648a 000000000000 000000000000
327 1 5 25ecb8cb8618 000000000000 000000000000
327 1 5 25ecb8cb8618 000000000000 000000000000
328
328
329 #if repobundlerepo
329 #if repobundlerepo
330 $ hg incoming .hg/strip-backup/*
330 $ hg incoming .hg/strip-backup/*
331 comparing with .hg/strip-backup/*-backup.hg (glob)
331 comparing with .hg/strip-backup/*-backup.hg (glob)
332 searching for changes
332 searching for changes
333 changeset: 6:51cfd7b1e13b
333 changeset: 6:51cfd7b1e13b
334 tag: tip
334 tag: tip
335 user: test
335 user: test
336 date: Thu Jan 01 00:00:00 1970 +0000
336 date: Thu Jan 01 00:00:00 1970 +0000
337 summary: modify dir1/a
337 summary: modify dir1/a
338
338
339 #endif
339 #endif
340
340
341 $ hg unbundle .hg/strip-backup/*
341 $ hg unbundle .hg/strip-backup/*
342 adding changesets
342 adding changesets
343 adding manifests
343 adding manifests
344 adding file changes
344 adding file changes
345 added 1 changesets with 1 changes to 1 files
345 added 1 changesets with 1 changes to 1 files
346 new changesets 51cfd7b1e13b
346 new changesets 51cfd7b1e13b
347 (run 'hg update' to get a working copy)
347 (run 'hg update' to get a working copy)
348 $ hg --config extensions.strip= strip tip
348 $ hg --config extensions.strip= strip tip
349 saved backup bundle to $TESTTMP/repo-mixed/.hg/strip-backup/*-backup.hg (glob)
349 saved backup bundle to $TESTTMP/repo-mixed/.hg/strip-backup/*-backup.hg (glob)
350 $ hg unbundle -q .hg/strip-backup/*
350 $ hg unbundle -q .hg/strip-backup/*
351 $ hg debugindex --dir dir1
351 $ hg debugindex --dir dir1
352 rev linkrev nodeid p1 p2
352 rev linkrev nodeid p1 p2
353 0 4 064927a0648a 000000000000 000000000000
353 0 4 064927a0648a 000000000000 000000000000
354 1 5 25ecb8cb8618 000000000000 000000000000
354 1 5 25ecb8cb8618 000000000000 000000000000
355 2 6 5b16163a30c6 25ecb8cb8618 000000000000
355 2 6 5b16163a30c6 25ecb8cb8618 000000000000
356 $ hg st --change tip
356 $ hg st --change tip
357 M dir1/a
357 M dir1/a
358
358
359 Shelving and unshelving should work
359 Shelving and unshelving should work
360
360
361 $ echo foo >> dir1/a
361 $ echo foo >> dir1/a
362 $ hg --config extensions.shelve= shelve
362 $ hg --config extensions.shelve= shelve
363 shelved as default
363 shelved as default
364 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
364 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
365 $ hg --config extensions.shelve= unshelve
365 $ hg --config extensions.shelve= unshelve
366 unshelving change 'default'
366 unshelving change 'default'
367 $ hg diff --nodates
367 $ hg diff --nodates
368 diff -r 708a273da119 dir1/a
368 diff -r 708a273da119 dir1/a
369 --- a/dir1/a
369 --- a/dir1/a
370 +++ b/dir1/a
370 +++ b/dir1/a
371 @@ -1,1 +1,2 @@
371 @@ -1,1 +1,2 @@
372 1
372 1
373 +foo
373 +foo
374
374
375 Pushing from treemanifest repo to an empty repo makes that a treemanifest repo
375 Pushing from treemanifest repo to an empty repo makes that a treemanifest repo
376
376
377 $ cd ..
377 $ cd ..
378 $ hg init empty-repo
378 $ hg init empty-repo
379 $ cat << EOF >> empty-repo/.hg/hgrc
379 $ cat << EOF >> empty-repo/.hg/hgrc
380 > [experimental]
380 > [experimental]
381 > changegroup3=yes
381 > changegroup3=yes
382 > EOF
382 > EOF
383 $ grep treemanifest empty-repo/.hg/requires
383 $ grep treemanifest empty-repo/.hg/requires
384 [1]
384 [1]
385 $ hg push -R repo -r 0 empty-repo
385 $ hg push -R repo -r 0 empty-repo
386 pushing to empty-repo
386 pushing to empty-repo
387 searching for changes
387 searching for changes
388 adding changesets
388 adding changesets
389 adding manifests
389 adding manifests
390 adding file changes
390 adding file changes
391 added 1 changesets with 2 changes to 2 files
391 added 1 changesets with 2 changes to 2 files
392 $ grep treemanifest empty-repo/.hg/requires
392 $ grep treemanifest empty-repo/.hg/requires
393 treemanifest
393 treemanifest
394
394
395 Pushing to an empty repo works
395 Pushing to an empty repo works
396
396
397 $ hg --config experimental.treemanifest=1 init clone
397 $ hg --config experimental.treemanifest=1 init clone
398 $ grep treemanifest clone/.hg/requires
398 $ grep treemanifest clone/.hg/requires
399 treemanifest
399 treemanifest
400 $ hg push -R repo clone
400 $ hg push -R repo clone
401 pushing to clone
401 pushing to clone
402 searching for changes
402 searching for changes
403 adding changesets
403 adding changesets
404 adding manifests
404 adding manifests
405 adding file changes
405 adding file changes
406 added 11 changesets with 15 changes to 10 files (+3 heads)
406 added 11 changesets with 15 changes to 10 files (+3 heads)
407 $ grep treemanifest clone/.hg/requires
407 $ grep treemanifest clone/.hg/requires
408 treemanifest
408 treemanifest
409 $ hg -R clone verify
409 $ hg -R clone verify
410 checking changesets
410 checking changesets
411 checking manifests
411 checking manifests
412 checking directory manifests
412 checking directory manifests
413 crosschecking files in changesets and manifests
413 crosschecking files in changesets and manifests
414 checking files
414 checking files
415 10 files, 11 changesets, 15 total revisions
415 10 files, 11 changesets, 15 total revisions
416
416
417 Create deeper repo with tree manifests.
417 Create deeper repo with tree manifests.
418
418
419 $ hg --config experimental.treemanifest=True init deeprepo
419 $ hg --config experimental.treemanifest=True init deeprepo
420 $ cd deeprepo
420 $ cd deeprepo
421
421
422 $ mkdir .A
422 $ mkdir .A
423 $ mkdir b
423 $ mkdir b
424 $ mkdir b/bar
424 $ mkdir b/bar
425 $ mkdir b/bar/orange
425 $ mkdir b/bar/orange
426 $ mkdir b/bar/orange/fly
426 $ mkdir b/bar/orange/fly
427 $ mkdir b/foo
427 $ mkdir b/foo
428 $ mkdir b/foo/apple
428 $ mkdir b/foo/apple
429 $ mkdir b/foo/apple/bees
429 $ mkdir b/foo/apple/bees
430
430
431 $ touch .A/one.txt
431 $ touch .A/one.txt
432 $ touch .A/two.txt
432 $ touch .A/two.txt
433 $ touch b/bar/fruits.txt
433 $ touch b/bar/fruits.txt
434 $ touch b/bar/orange/fly/gnat.py
434 $ touch b/bar/orange/fly/gnat.py
435 $ touch b/bar/orange/fly/housefly.txt
435 $ touch b/bar/orange/fly/housefly.txt
436 $ touch b/foo/apple/bees/flower.py
436 $ touch b/foo/apple/bees/flower.py
437 $ touch c.txt
437 $ touch c.txt
438 $ touch d.py
438 $ touch d.py
439
439
440 $ hg ci -Aqm 'initial'
440 $ hg ci -Aqm 'initial'
441
441
442 $ echo >> .A/one.txt
442 $ echo >> .A/one.txt
443 $ echo >> .A/two.txt
443 $ echo >> .A/two.txt
444 $ echo >> b/bar/fruits.txt
444 $ echo >> b/bar/fruits.txt
445 $ echo >> b/bar/orange/fly/gnat.py
445 $ echo >> b/bar/orange/fly/gnat.py
446 $ echo >> b/bar/orange/fly/housefly.txt
446 $ echo >> b/bar/orange/fly/housefly.txt
447 $ echo >> b/foo/apple/bees/flower.py
447 $ echo >> b/foo/apple/bees/flower.py
448 $ echo >> c.txt
448 $ echo >> c.txt
449 $ echo >> d.py
449 $ echo >> d.py
450 $ hg ci -Aqm 'second'
450 $ hg ci -Aqm 'second'
451
451
452 We'll see that visitdir works by removing some treemanifest revlogs and running
452 We'll see that visitdir works by removing some treemanifest revlogs and running
453 the files command with various parameters.
453 the files command with various parameters.
454
454
455 Test files from the root.
455 Test files from the root.
456
456
457 $ hg files -r .
457 $ hg files -r .
458 .A/one.txt
458 .A/one.txt
459 .A/two.txt
459 .A/two.txt
460 b/bar/fruits.txt
460 b/bar/fruits.txt
461 b/bar/orange/fly/gnat.py
461 b/bar/orange/fly/gnat.py
462 b/bar/orange/fly/housefly.txt
462 b/bar/orange/fly/housefly.txt
463 b/foo/apple/bees/flower.py
463 b/foo/apple/bees/flower.py
464 c.txt
464 c.txt
465 d.py
465 d.py
466
466
467 Excludes with a glob should not exclude everything from the glob's root
467 Excludes with a glob should not exclude everything from the glob's root
468
468
469 $ hg files -r . -X 'b/fo?' b
469 $ hg files -r . -X 'b/fo?' b
470 b/bar/fruits.txt
470 b/bar/fruits.txt
471 b/bar/orange/fly/gnat.py
471 b/bar/orange/fly/gnat.py
472 b/bar/orange/fly/housefly.txt
472 b/bar/orange/fly/housefly.txt
473 $ cp -R .hg/store .hg/store-copy
473 $ cp -R .hg/store .hg/store-copy
474
474
475 Test files for a subdirectory.
475 Test files for a subdirectory.
476
476
477 #if reporevlogstore
477 $ rm -r .hg/store/meta/~2e_a
478 $ rm -r .hg/store/meta/~2e_a
479 #endif
480 #if reposimplestore
481 $ rm -r .hg/store/meta/._a
482 #endif
478 $ hg files -r . b
483 $ hg files -r . b
479 b/bar/fruits.txt
484 b/bar/fruits.txt
480 b/bar/orange/fly/gnat.py
485 b/bar/orange/fly/gnat.py
481 b/bar/orange/fly/housefly.txt
486 b/bar/orange/fly/housefly.txt
482 b/foo/apple/bees/flower.py
487 b/foo/apple/bees/flower.py
483 $ hg diff -r '.^' -r . --stat b
488 $ hg diff -r '.^' -r . --stat b
484 b/bar/fruits.txt | 1 +
489 b/bar/fruits.txt | 1 +
485 b/bar/orange/fly/gnat.py | 1 +
490 b/bar/orange/fly/gnat.py | 1 +
486 b/bar/orange/fly/housefly.txt | 1 +
491 b/bar/orange/fly/housefly.txt | 1 +
487 b/foo/apple/bees/flower.py | 1 +
492 b/foo/apple/bees/flower.py | 1 +
488 4 files changed, 4 insertions(+), 0 deletions(-)
493 4 files changed, 4 insertions(+), 0 deletions(-)
489 $ cp -R .hg/store-copy/. .hg/store
494 $ cp -R .hg/store-copy/. .hg/store
490
495
491 Test files with just includes and excludes.
496 Test files with just includes and excludes.
492
497
498 #if reporevlogstore
493 $ rm -r .hg/store/meta/~2e_a
499 $ rm -r .hg/store/meta/~2e_a
500 #endif
501 #if reposimplestore
502 $ rm -r .hg/store/meta/._a
503 #endif
494 $ rm -r .hg/store/meta/b/bar/orange/fly
504 $ rm -r .hg/store/meta/b/bar/orange/fly
495 $ rm -r .hg/store/meta/b/foo/apple/bees
505 $ rm -r .hg/store/meta/b/foo/apple/bees
496 $ hg files -r . -I path:b/bar -X path:b/bar/orange/fly -I path:b/foo -X path:b/foo/apple/bees
506 $ hg files -r . -I path:b/bar -X path:b/bar/orange/fly -I path:b/foo -X path:b/foo/apple/bees
497 b/bar/fruits.txt
507 b/bar/fruits.txt
498 $ hg diff -r '.^' -r . --stat -I path:b/bar -X path:b/bar/orange/fly -I path:b/foo -X path:b/foo/apple/bees
508 $ hg diff -r '.^' -r . --stat -I path:b/bar -X path:b/bar/orange/fly -I path:b/foo -X path:b/foo/apple/bees
499 b/bar/fruits.txt | 1 +
509 b/bar/fruits.txt | 1 +
500 1 files changed, 1 insertions(+), 0 deletions(-)
510 1 files changed, 1 insertions(+), 0 deletions(-)
501 $ cp -R .hg/store-copy/. .hg/store
511 $ cp -R .hg/store-copy/. .hg/store
502
512
503 Test files for a subdirectory, excluding a directory within it.
513 Test files for a subdirectory, excluding a directory within it.
504
514
515 #if reporevlogstore
505 $ rm -r .hg/store/meta/~2e_a
516 $ rm -r .hg/store/meta/~2e_a
517 #endif
518 #if reposimplestore
519 $ rm -r .hg/store/meta/._a
520 #endif
506 $ rm -r .hg/store/meta/b/foo
521 $ rm -r .hg/store/meta/b/foo
507 $ hg files -r . -X path:b/foo b
522 $ hg files -r . -X path:b/foo b
508 b/bar/fruits.txt
523 b/bar/fruits.txt
509 b/bar/orange/fly/gnat.py
524 b/bar/orange/fly/gnat.py
510 b/bar/orange/fly/housefly.txt
525 b/bar/orange/fly/housefly.txt
511 $ hg diff -r '.^' -r . --stat -X path:b/foo b
526 $ hg diff -r '.^' -r . --stat -X path:b/foo b
512 b/bar/fruits.txt | 1 +
527 b/bar/fruits.txt | 1 +
513 b/bar/orange/fly/gnat.py | 1 +
528 b/bar/orange/fly/gnat.py | 1 +
514 b/bar/orange/fly/housefly.txt | 1 +
529 b/bar/orange/fly/housefly.txt | 1 +
515 3 files changed, 3 insertions(+), 0 deletions(-)
530 3 files changed, 3 insertions(+), 0 deletions(-)
516 $ cp -R .hg/store-copy/. .hg/store
531 $ cp -R .hg/store-copy/. .hg/store
517
532
518 Test files for a sub directory, including only a directory within it, and
533 Test files for a sub directory, including only a directory within it, and
519 including an unrelated directory.
534 including an unrelated directory.
520
535
536 #if reporevlogstore
521 $ rm -r .hg/store/meta/~2e_a
537 $ rm -r .hg/store/meta/~2e_a
538 #endif
539 #if reposimplestore
540 $ rm -r .hg/store/meta/._a
541 #endif
522 $ rm -r .hg/store/meta/b/foo
542 $ rm -r .hg/store/meta/b/foo
523 $ hg files -r . -I path:b/bar/orange -I path:a b
543 $ hg files -r . -I path:b/bar/orange -I path:a b
524 b/bar/orange/fly/gnat.py
544 b/bar/orange/fly/gnat.py
525 b/bar/orange/fly/housefly.txt
545 b/bar/orange/fly/housefly.txt
526 $ hg diff -r '.^' -r . --stat -I path:b/bar/orange -I path:a b
546 $ hg diff -r '.^' -r . --stat -I path:b/bar/orange -I path:a b
527 b/bar/orange/fly/gnat.py | 1 +
547 b/bar/orange/fly/gnat.py | 1 +
528 b/bar/orange/fly/housefly.txt | 1 +
548 b/bar/orange/fly/housefly.txt | 1 +
529 2 files changed, 2 insertions(+), 0 deletions(-)
549 2 files changed, 2 insertions(+), 0 deletions(-)
530 $ cp -R .hg/store-copy/. .hg/store
550 $ cp -R .hg/store-copy/. .hg/store
531
551
532 Test files for a pattern, including a directory, and excluding a directory
552 Test files for a pattern, including a directory, and excluding a directory
533 within that.
553 within that.
534
554
555 #if reporevlogstore
535 $ rm -r .hg/store/meta/~2e_a
556 $ rm -r .hg/store/meta/~2e_a
557 #endif
558 #if reposimplestore
559 $ rm -r .hg/store/meta/._a
560 #endif
536 $ rm -r .hg/store/meta/b/foo
561 $ rm -r .hg/store/meta/b/foo
537 $ rm -r .hg/store/meta/b/bar/orange
562 $ rm -r .hg/store/meta/b/bar/orange
538 $ hg files -r . glob:**.txt -I path:b/bar -X path:b/bar/orange
563 $ hg files -r . glob:**.txt -I path:b/bar -X path:b/bar/orange
539 b/bar/fruits.txt
564 b/bar/fruits.txt
540 $ hg diff -r '.^' -r . --stat glob:**.txt -I path:b/bar -X path:b/bar/orange
565 $ hg diff -r '.^' -r . --stat glob:**.txt -I path:b/bar -X path:b/bar/orange
541 b/bar/fruits.txt | 1 +
566 b/bar/fruits.txt | 1 +
542 1 files changed, 1 insertions(+), 0 deletions(-)
567 1 files changed, 1 insertions(+), 0 deletions(-)
543 $ cp -R .hg/store-copy/. .hg/store
568 $ cp -R .hg/store-copy/. .hg/store
544
569
545 Add some more changes to the deep repo
570 Add some more changes to the deep repo
546 $ echo narf >> b/bar/fruits.txt
571 $ echo narf >> b/bar/fruits.txt
547 $ hg ci -m narf
572 $ hg ci -m narf
548 $ echo troz >> b/bar/orange/fly/gnat.py
573 $ echo troz >> b/bar/orange/fly/gnat.py
549 $ hg ci -m troz
574 $ hg ci -m troz
550
575
551 Verify works
576 Verify works
552 $ hg verify
577 $ hg verify
553 checking changesets
578 checking changesets
554 checking manifests
579 checking manifests
555 checking directory manifests
580 checking directory manifests
556 crosschecking files in changesets and manifests
581 crosschecking files in changesets and manifests
557 checking files
582 checking files
558 8 files, 4 changesets, 18 total revisions
583 8 files, 4 changesets, 18 total revisions
559
584
560 #if repofncache
585 #if repofncache
561 Dirlogs are included in fncache
586 Dirlogs are included in fncache
562 $ grep meta/.A/00manifest.i .hg/store/fncache
587 $ grep meta/.A/00manifest.i .hg/store/fncache
563 meta/.A/00manifest.i
588 meta/.A/00manifest.i
564
589
565 Rebuilt fncache includes dirlogs
590 Rebuilt fncache includes dirlogs
566 $ rm .hg/store/fncache
591 $ rm .hg/store/fncache
567 $ hg debugrebuildfncache
592 $ hg debugrebuildfncache
568 adding data/.A/one.txt.i
593 adding data/.A/one.txt.i
569 adding data/.A/two.txt.i
594 adding data/.A/two.txt.i
570 adding data/b/bar/fruits.txt.i
595 adding data/b/bar/fruits.txt.i
571 adding data/b/bar/orange/fly/gnat.py.i
596 adding data/b/bar/orange/fly/gnat.py.i
572 adding data/b/bar/orange/fly/housefly.txt.i
597 adding data/b/bar/orange/fly/housefly.txt.i
573 adding data/b/foo/apple/bees/flower.py.i
598 adding data/b/foo/apple/bees/flower.py.i
574 adding data/c.txt.i
599 adding data/c.txt.i
575 adding data/d.py.i
600 adding data/d.py.i
576 adding meta/.A/00manifest.i
601 adding meta/.A/00manifest.i
577 adding meta/b/00manifest.i
602 adding meta/b/00manifest.i
578 adding meta/b/bar/00manifest.i
603 adding meta/b/bar/00manifest.i
579 adding meta/b/bar/orange/00manifest.i
604 adding meta/b/bar/orange/00manifest.i
580 adding meta/b/bar/orange/fly/00manifest.i
605 adding meta/b/bar/orange/fly/00manifest.i
581 adding meta/b/foo/00manifest.i
606 adding meta/b/foo/00manifest.i
582 adding meta/b/foo/apple/00manifest.i
607 adding meta/b/foo/apple/00manifest.i
583 adding meta/b/foo/apple/bees/00manifest.i
608 adding meta/b/foo/apple/bees/00manifest.i
584 16 items added, 0 removed from fncache
609 16 items added, 0 removed from fncache
585 #endif
610 #endif
586
611
587 Finish first server
612 Finish first server
588 $ killdaemons.py
613 $ killdaemons.py
589
614
590 Back up the recently added revlogs
615 Back up the recently added revlogs
591 $ cp -R .hg/store .hg/store-newcopy
616 $ cp -R .hg/store .hg/store-newcopy
592
617
593 Verify reports missing dirlog
618 Verify reports missing dirlog
594 $ rm .hg/store/meta/b/00manifest.*
619 $ rm .hg/store/meta/b/00manifest.*
595 $ hg verify
620 $ hg verify
596 checking changesets
621 checking changesets
597 checking manifests
622 checking manifests
598 checking directory manifests
623 checking directory manifests
599 0: empty or missing b/
624 0: empty or missing b/
600 b/@0: parent-directory manifest refers to unknown revision 67688a370455
625 b/@0: parent-directory manifest refers to unknown revision 67688a370455
601 b/@1: parent-directory manifest refers to unknown revision f065da70369e
626 b/@1: parent-directory manifest refers to unknown revision f065da70369e
602 b/@2: parent-directory manifest refers to unknown revision ac0d30948e0b
627 b/@2: parent-directory manifest refers to unknown revision ac0d30948e0b
603 b/@3: parent-directory manifest refers to unknown revision 367152e6af28
628 b/@3: parent-directory manifest refers to unknown revision 367152e6af28
604 warning: orphan data file 'meta/b/bar/00manifest.i'
629 warning: orphan data file 'meta/b/bar/00manifest.i' (reporevlogstore !)
605 warning: orphan data file 'meta/b/bar/orange/00manifest.i'
630 warning: orphan data file 'meta/b/bar/orange/00manifest.i' (reporevlogstore !)
606 warning: orphan data file 'meta/b/bar/orange/fly/00manifest.i'
631 warning: orphan data file 'meta/b/bar/orange/fly/00manifest.i' (reporevlogstore !)
607 warning: orphan data file 'meta/b/foo/00manifest.i'
632 warning: orphan data file 'meta/b/foo/00manifest.i' (reporevlogstore !)
608 warning: orphan data file 'meta/b/foo/apple/00manifest.i'
633 warning: orphan data file 'meta/b/foo/apple/00manifest.i' (reporevlogstore !)
609 warning: orphan data file 'meta/b/foo/apple/bees/00manifest.i'
634 warning: orphan data file 'meta/b/foo/apple/bees/00manifest.i' (reporevlogstore !)
610 crosschecking files in changesets and manifests
635 crosschecking files in changesets and manifests
611 b/bar/fruits.txt@0: in changeset but not in manifest
636 b/bar/fruits.txt@0: in changeset but not in manifest
612 b/bar/orange/fly/gnat.py@0: in changeset but not in manifest
637 b/bar/orange/fly/gnat.py@0: in changeset but not in manifest
613 b/bar/orange/fly/housefly.txt@0: in changeset but not in manifest
638 b/bar/orange/fly/housefly.txt@0: in changeset but not in manifest
614 b/foo/apple/bees/flower.py@0: in changeset but not in manifest
639 b/foo/apple/bees/flower.py@0: in changeset but not in manifest
615 checking files
640 checking files
616 8 files, 4 changesets, 18 total revisions
641 8 files, 4 changesets, 18 total revisions
617 6 warnings encountered!
642 6 warnings encountered! (reporevlogstore !)
618 9 integrity errors encountered!
643 9 integrity errors encountered!
619 (first damaged changeset appears to be 0)
644 (first damaged changeset appears to be 0)
620 [1]
645 [1]
621 $ cp -R .hg/store-newcopy/. .hg/store
646 $ cp -R .hg/store-newcopy/. .hg/store
622
647
623 Verify reports missing dirlog entry
648 Verify reports missing dirlog entry
624 $ mv -f .hg/store-copy/meta/b/00manifest.* .hg/store/meta/b/
649 $ mv -f .hg/store-copy/meta/b/00manifest.* .hg/store/meta/b/
625 $ hg verify
650 $ hg verify
626 checking changesets
651 checking changesets
627 checking manifests
652 checking manifests
628 checking directory manifests
653 checking directory manifests
629 b/@2: parent-directory manifest refers to unknown revision ac0d30948e0b
654 b/@2: parent-directory manifest refers to unknown revision ac0d30948e0b
630 b/@3: parent-directory manifest refers to unknown revision 367152e6af28
655 b/@3: parent-directory manifest refers to unknown revision 367152e6af28
631 b/bar/@?: rev 2 points to unexpected changeset 2
656 b/bar/@?: rev 2 points to unexpected changeset 2
632 b/bar/@?: 44d7e1146e0d not in parent-directory manifest
657 b/bar/@?: 44d7e1146e0d not in parent-directory manifest
633 b/bar/@?: rev 3 points to unexpected changeset 3
658 b/bar/@?: rev 3 points to unexpected changeset 3
634 b/bar/@?: 70b10c6b17b7 not in parent-directory manifest
659 b/bar/@?: 70b10c6b17b7 not in parent-directory manifest
635 b/bar/orange/@?: rev 2 points to unexpected changeset 3
660 b/bar/orange/@?: rev 2 points to unexpected changeset 3
636 (expected None)
661 (expected None)
637 b/bar/orange/fly/@?: rev 2 points to unexpected changeset 3
662 b/bar/orange/fly/@?: rev 2 points to unexpected changeset 3
638 (expected None)
663 (expected None)
639 crosschecking files in changesets and manifests
664 crosschecking files in changesets and manifests
640 checking files
665 checking files
641 8 files, 4 changesets, 18 total revisions
666 8 files, 4 changesets, 18 total revisions
642 2 warnings encountered!
667 2 warnings encountered!
643 8 integrity errors encountered!
668 8 integrity errors encountered!
644 (first damaged changeset appears to be 2)
669 (first damaged changeset appears to be 2)
645 [1]
670 [1]
646 $ cp -R .hg/store-newcopy/. .hg/store
671 $ cp -R .hg/store-newcopy/. .hg/store
647
672
648 Test cloning a treemanifest repo over http.
673 Test cloning a treemanifest repo over http.
649 $ hg serve -p $HGPORT -d --pid-file=hg.pid --errorlog=errors.log
674 $ hg serve -p $HGPORT -d --pid-file=hg.pid --errorlog=errors.log
650 $ cat hg.pid >> $DAEMON_PIDS
675 $ cat hg.pid >> $DAEMON_PIDS
651 $ cd ..
676 $ cd ..
652 We can clone even with the knob turned off and we'll get a treemanifest repo.
677 We can clone even with the knob turned off and we'll get a treemanifest repo.
653 $ hg clone --config experimental.treemanifest=False \
678 $ hg clone --config experimental.treemanifest=False \
654 > --config experimental.changegroup3=True \
679 > --config experimental.changegroup3=True \
655 > http://localhost:$HGPORT deepclone
680 > http://localhost:$HGPORT deepclone
656 requesting all changes
681 requesting all changes
657 adding changesets
682 adding changesets
658 adding manifests
683 adding manifests
659 adding file changes
684 adding file changes
660 added 4 changesets with 18 changes to 8 files
685 added 4 changesets with 18 changes to 8 files
661 new changesets 775704be6f52:523e5c631710
686 new changesets 775704be6f52:523e5c631710
662 updating to branch default
687 updating to branch default
663 8 files updated, 0 files merged, 0 files removed, 0 files unresolved
688 8 files updated, 0 files merged, 0 files removed, 0 files unresolved
664 No server errors.
689 No server errors.
665 $ cat deeprepo/errors.log
690 $ cat deeprepo/errors.log
666 requires got updated to include treemanifest
691 requires got updated to include treemanifest
667 $ cat deepclone/.hg/requires | grep treemanifest
692 $ cat deepclone/.hg/requires | grep treemanifest
668 treemanifest
693 treemanifest
669 Tree manifest revlogs exist.
694 Tree manifest revlogs exist.
670 $ find deepclone/.hg/store/meta | sort
695 $ find deepclone/.hg/store/meta | sort
671 deepclone/.hg/store/meta
696 deepclone/.hg/store/meta
697 deepclone/.hg/store/meta/._a (reposimplestore !)
698 deepclone/.hg/store/meta/._a/00manifest.i (reposimplestore !)
672 deepclone/.hg/store/meta/b
699 deepclone/.hg/store/meta/b
673 deepclone/.hg/store/meta/b/00manifest.i
700 deepclone/.hg/store/meta/b/00manifest.i
674 deepclone/.hg/store/meta/b/bar
701 deepclone/.hg/store/meta/b/bar
675 deepclone/.hg/store/meta/b/bar/00manifest.i
702 deepclone/.hg/store/meta/b/bar/00manifest.i
676 deepclone/.hg/store/meta/b/bar/orange
703 deepclone/.hg/store/meta/b/bar/orange
677 deepclone/.hg/store/meta/b/bar/orange/00manifest.i
704 deepclone/.hg/store/meta/b/bar/orange/00manifest.i
678 deepclone/.hg/store/meta/b/bar/orange/fly
705 deepclone/.hg/store/meta/b/bar/orange/fly
679 deepclone/.hg/store/meta/b/bar/orange/fly/00manifest.i
706 deepclone/.hg/store/meta/b/bar/orange/fly/00manifest.i
680 deepclone/.hg/store/meta/b/foo
707 deepclone/.hg/store/meta/b/foo
681 deepclone/.hg/store/meta/b/foo/00manifest.i
708 deepclone/.hg/store/meta/b/foo/00manifest.i
682 deepclone/.hg/store/meta/b/foo/apple
709 deepclone/.hg/store/meta/b/foo/apple
683 deepclone/.hg/store/meta/b/foo/apple/00manifest.i
710 deepclone/.hg/store/meta/b/foo/apple/00manifest.i
684 deepclone/.hg/store/meta/b/foo/apple/bees
711 deepclone/.hg/store/meta/b/foo/apple/bees
685 deepclone/.hg/store/meta/b/foo/apple/bees/00manifest.i
712 deepclone/.hg/store/meta/b/foo/apple/bees/00manifest.i
686 deepclone/.hg/store/meta/~2e_a
713 deepclone/.hg/store/meta/~2e_a (reporevlogstore !)
687 deepclone/.hg/store/meta/~2e_a/00manifest.i
714 deepclone/.hg/store/meta/~2e_a/00manifest.i (reporevlogstore !)
688 Verify passes.
715 Verify passes.
689 $ cd deepclone
716 $ cd deepclone
690 $ hg verify
717 $ hg verify
691 checking changesets
718 checking changesets
692 checking manifests
719 checking manifests
693 checking directory manifests
720 checking directory manifests
694 crosschecking files in changesets and manifests
721 crosschecking files in changesets and manifests
695 checking files
722 checking files
696 8 files, 4 changesets, 18 total revisions
723 8 files, 4 changesets, 18 total revisions
697 $ cd ..
724 $ cd ..
698
725
726 #if reporevlogstore
699 Create clones using old repo formats to use in later tests
727 Create clones using old repo formats to use in later tests
700 $ hg clone --config format.usestore=False \
728 $ hg clone --config format.usestore=False \
701 > --config experimental.changegroup3=True \
729 > --config experimental.changegroup3=True \
702 > http://localhost:$HGPORT deeprepo-basicstore
730 > http://localhost:$HGPORT deeprepo-basicstore
703 requesting all changes
731 requesting all changes
704 adding changesets
732 adding changesets
705 adding manifests
733 adding manifests
706 adding file changes
734 adding file changes
707 added 4 changesets with 18 changes to 8 files
735 added 4 changesets with 18 changes to 8 files
708 new changesets 775704be6f52:523e5c631710
736 new changesets 775704be6f52:523e5c631710
709 updating to branch default
737 updating to branch default
710 8 files updated, 0 files merged, 0 files removed, 0 files unresolved
738 8 files updated, 0 files merged, 0 files removed, 0 files unresolved
711 $ cd deeprepo-basicstore
739 $ cd deeprepo-basicstore
712 $ grep store .hg/requires
740 $ grep store .hg/requires
713 [1]
741 [1]
714 $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --errorlog=errors.log
742 $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --errorlog=errors.log
715 $ cat hg.pid >> $DAEMON_PIDS
743 $ cat hg.pid >> $DAEMON_PIDS
716 $ cd ..
744 $ cd ..
717 $ hg clone --config format.usefncache=False \
745 $ hg clone --config format.usefncache=False \
718 > --config experimental.changegroup3=True \
746 > --config experimental.changegroup3=True \
719 > http://localhost:$HGPORT deeprepo-encodedstore
747 > http://localhost:$HGPORT deeprepo-encodedstore
720 requesting all changes
748 requesting all changes
721 adding changesets
749 adding changesets
722 adding manifests
750 adding manifests
723 adding file changes
751 adding file changes
724 added 4 changesets with 18 changes to 8 files
752 added 4 changesets with 18 changes to 8 files
725 new changesets 775704be6f52:523e5c631710
753 new changesets 775704be6f52:523e5c631710
726 updating to branch default
754 updating to branch default
727 8 files updated, 0 files merged, 0 files removed, 0 files unresolved
755 8 files updated, 0 files merged, 0 files removed, 0 files unresolved
728 $ cd deeprepo-encodedstore
756 $ cd deeprepo-encodedstore
729 $ grep fncache .hg/requires
757 $ grep fncache .hg/requires
730 [1]
758 [1]
731 $ hg serve -p $HGPORT2 -d --pid-file=hg.pid --errorlog=errors.log
759 $ hg serve -p $HGPORT2 -d --pid-file=hg.pid --errorlog=errors.log
732 $ cat hg.pid >> $DAEMON_PIDS
760 $ cat hg.pid >> $DAEMON_PIDS
733 $ cd ..
761 $ cd ..
734
762
735 Local clone with basicstore
763 Local clone with basicstore
736 $ hg clone -U deeprepo-basicstore local-clone-basicstore
764 $ hg clone -U deeprepo-basicstore local-clone-basicstore
737 $ hg -R local-clone-basicstore verify
765 $ hg -R local-clone-basicstore verify
738 checking changesets
766 checking changesets
739 checking manifests
767 checking manifests
740 checking directory manifests
768 checking directory manifests
741 crosschecking files in changesets and manifests
769 crosschecking files in changesets and manifests
742 checking files
770 checking files
743 8 files, 4 changesets, 18 total revisions
771 8 files, 4 changesets, 18 total revisions
744
772
745 Local clone with encodedstore
773 Local clone with encodedstore
746 $ hg clone -U deeprepo-encodedstore local-clone-encodedstore
774 $ hg clone -U deeprepo-encodedstore local-clone-encodedstore
747 $ hg -R local-clone-encodedstore verify
775 $ hg -R local-clone-encodedstore verify
748 checking changesets
776 checking changesets
749 checking manifests
777 checking manifests
750 checking directory manifests
778 checking directory manifests
751 crosschecking files in changesets and manifests
779 crosschecking files in changesets and manifests
752 checking files
780 checking files
753 8 files, 4 changesets, 18 total revisions
781 8 files, 4 changesets, 18 total revisions
754
782
755 Local clone with fncachestore
783 Local clone with fncachestore
756 $ hg clone -U deeprepo local-clone-fncachestore
784 $ hg clone -U deeprepo local-clone-fncachestore
757 $ hg -R local-clone-fncachestore verify
785 $ hg -R local-clone-fncachestore verify
758 checking changesets
786 checking changesets
759 checking manifests
787 checking manifests
760 checking directory manifests
788 checking directory manifests
761 crosschecking files in changesets and manifests
789 crosschecking files in changesets and manifests
762 checking files
790 checking files
763 8 files, 4 changesets, 18 total revisions
791 8 files, 4 changesets, 18 total revisions
764
792
765 Stream clone with basicstore
793 Stream clone with basicstore
766 $ hg clone --config experimental.changegroup3=True --stream -U \
794 $ hg clone --config experimental.changegroup3=True --stream -U \
767 > http://localhost:$HGPORT1 stream-clone-basicstore
795 > http://localhost:$HGPORT1 stream-clone-basicstore
768 streaming all changes
796 streaming all changes
769 18 files to transfer, * of data (glob)
797 18 files to transfer, * of data (glob)
770 transferred * in * seconds (*) (glob)
798 transferred * in * seconds (*) (glob)
771 searching for changes
799 searching for changes
772 no changes found
800 no changes found
773 $ hg -R stream-clone-basicstore verify
801 $ hg -R stream-clone-basicstore verify
774 checking changesets
802 checking changesets
775 checking manifests
803 checking manifests
776 checking directory manifests
804 checking directory manifests
777 crosschecking files in changesets and manifests
805 crosschecking files in changesets and manifests
778 checking files
806 checking files
779 8 files, 4 changesets, 18 total revisions
807 8 files, 4 changesets, 18 total revisions
780
808
781 Stream clone with encodedstore
809 Stream clone with encodedstore
782 $ hg clone --config experimental.changegroup3=True --stream -U \
810 $ hg clone --config experimental.changegroup3=True --stream -U \
783 > http://localhost:$HGPORT2 stream-clone-encodedstore
811 > http://localhost:$HGPORT2 stream-clone-encodedstore
784 streaming all changes
812 streaming all changes
785 18 files to transfer, * of data (glob)
813 18 files to transfer, * of data (glob)
786 transferred * in * seconds (*) (glob)
814 transferred * in * seconds (*) (glob)
787 searching for changes
815 searching for changes
788 no changes found
816 no changes found
789 $ hg -R stream-clone-encodedstore verify
817 $ hg -R stream-clone-encodedstore verify
790 checking changesets
818 checking changesets
791 checking manifests
819 checking manifests
792 checking directory manifests
820 checking directory manifests
793 crosschecking files in changesets and manifests
821 crosschecking files in changesets and manifests
794 checking files
822 checking files
795 8 files, 4 changesets, 18 total revisions
823 8 files, 4 changesets, 18 total revisions
796
824
797 Stream clone with fncachestore
825 Stream clone with fncachestore
798 $ hg clone --config experimental.changegroup3=True --stream -U \
826 $ hg clone --config experimental.changegroup3=True --stream -U \
799 > http://localhost:$HGPORT stream-clone-fncachestore
827 > http://localhost:$HGPORT stream-clone-fncachestore
800 streaming all changes
828 streaming all changes
801 18 files to transfer, * of data (glob)
829 18 files to transfer, * of data (glob)
802 transferred * in * seconds (*) (glob)
830 transferred * in * seconds (*) (glob)
803 searching for changes
831 searching for changes
804 no changes found
832 no changes found
805 $ hg -R stream-clone-fncachestore verify
833 $ hg -R stream-clone-fncachestore verify
806 checking changesets
834 checking changesets
807 checking manifests
835 checking manifests
808 checking directory manifests
836 checking directory manifests
809 crosschecking files in changesets and manifests
837 crosschecking files in changesets and manifests
810 checking files
838 checking files
811 8 files, 4 changesets, 18 total revisions
839 8 files, 4 changesets, 18 total revisions
812
840
813 Packed bundle
841 Packed bundle
814 $ hg -R deeprepo debugcreatestreamclonebundle repo-packed.hg
842 $ hg -R deeprepo debugcreatestreamclonebundle repo-packed.hg
815 writing 5330 bytes for 18 files
843 writing 5330 bytes for 18 files
816 bundle requirements: generaldelta, revlogv1, treemanifest
844 bundle requirements: generaldelta, revlogv1, treemanifest
817 $ hg debugbundle --spec repo-packed.hg
845 $ hg debugbundle --spec repo-packed.hg
818 none-packed1;requirements%3Dgeneraldelta%2Crevlogv1%2Ctreemanifest
846 none-packed1;requirements%3Dgeneraldelta%2Crevlogv1%2Ctreemanifest
819
847
848 #endif
849
820 Bundle with changegroup2 is not supported
850 Bundle with changegroup2 is not supported
821
851
822 $ hg -R deeprepo bundle --all -t v2 deeprepo.bundle
852 $ hg -R deeprepo bundle --all -t v2 deeprepo.bundle
823 abort: repository does not support bundle version 02
853 abort: repository does not support bundle version 02
824 [255]
854 [255]
825
855
826 Pull does not include changegroup for manifest the client already has from
856 Pull does not include changegroup for manifest the client already has from
827 other branch
857 other branch
828
858
829 $ mkdir grafted-dir-repo
859 $ mkdir grafted-dir-repo
830 $ cd grafted-dir-repo
860 $ cd grafted-dir-repo
831 $ hg --config experimental.treemanifest=1 init
861 $ hg --config experimental.treemanifest=1 init
832 $ mkdir dir
862 $ mkdir dir
833 $ echo a > dir/file
863 $ echo a > dir/file
834 $ echo a > file
864 $ echo a > file
835 $ hg ci -Am initial
865 $ hg ci -Am initial
836 adding dir/file
866 adding dir/file
837 adding file
867 adding file
838 $ echo b > dir/file
868 $ echo b > dir/file
839 $ hg ci -m updated
869 $ hg ci -m updated
840 $ hg co '.^'
870 $ hg co '.^'
841 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
871 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
842 $ hg revert -r tip dir/
872 $ hg revert -r tip dir/
843 reverting dir/file
873 reverting dir/file
844 $ echo b > file # to make sure root manifest is sent
874 $ echo b > file # to make sure root manifest is sent
845 $ hg ci -m grafted
875 $ hg ci -m grafted
846 created new head
876 created new head
847 $ cd ..
877 $ cd ..
848
878
849 $ hg --config experimental.treemanifest=1 clone --pull -r 1 \
879 $ hg --config experimental.treemanifest=1 clone --pull -r 1 \
850 > grafted-dir-repo grafted-dir-repo-clone
880 > grafted-dir-repo grafted-dir-repo-clone
851 adding changesets
881 adding changesets
852 adding manifests
882 adding manifests
853 adding file changes
883 adding file changes
854 added 2 changesets with 3 changes to 2 files
884 added 2 changesets with 3 changes to 2 files
855 new changesets d84f4c419457:09ab742f3b0f
885 new changesets d84f4c419457:09ab742f3b0f
856 updating to branch default
886 updating to branch default
857 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
887 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
858 $ cd grafted-dir-repo-clone
888 $ cd grafted-dir-repo-clone
859 $ hg pull -r 2
889 $ hg pull -r 2
860 pulling from $TESTTMP/grafted-dir-repo
890 pulling from $TESTTMP/grafted-dir-repo
861 searching for changes
891 searching for changes
862 adding changesets
892 adding changesets
863 adding manifests
893 adding manifests
864 adding file changes
894 adding file changes
865 added 1 changesets with 1 changes to 1 files (+1 heads)
895 added 1 changesets with 1 changes to 1 files (+1 heads)
866 new changesets 73699489fb7c
896 new changesets 73699489fb7c
867 (run 'hg heads' to see heads, 'hg merge' to merge)
897 (run 'hg heads' to see heads, 'hg merge' to merge)
868
898
869 Committing a empty commit does not duplicate root treemanifest
899 Committing a empty commit does not duplicate root treemanifest
870 $ echo z >> z
900 $ echo z >> z
871 $ hg commit -Aqm 'pre-empty commit'
901 $ hg commit -Aqm 'pre-empty commit'
872 $ hg rm z
902 $ hg rm z
873 $ hg commit --amend -m 'empty commit'
903 $ hg commit --amend -m 'empty commit'
874 saved backup bundle to $TESTTMP/grafted-dir-repo-clone/.hg/strip-backup/cb99d5717cea-9e3b6b02-amend.hg
904 saved backup bundle to $TESTTMP/grafted-dir-repo-clone/.hg/strip-backup/cb99d5717cea-9e3b6b02-amend.hg
875 $ hg log -r 'tip + tip^' -T '{manifest}\n'
905 $ hg log -r 'tip + tip^' -T '{manifest}\n'
876 1:678d3574b88c
906 1:678d3574b88c
877 1:678d3574b88c
907 1:678d3574b88c
878 $ hg --config extensions.strip= strip -r . -q
908 $ hg --config extensions.strip= strip -r . -q
General Comments 0
You need to be logged in to leave comments. Login now