##// END OF EJS Templates
tests: stabilize `test-sparse.t` on Windows...
Matt Harbison -
r52843:93a533fa default
parent child Browse files
Show More
@@ -1,463 +1,465
1 test sparse
1 test sparse
2
2
3 $ hg init myrepo
3 $ hg init myrepo
4 $ cd myrepo
4 $ cd myrepo
5 $ cat > .hg/hgrc <<EOF
5 $ cat > .hg/hgrc <<EOF
6 > [extensions]
6 > [extensions]
7 > sparse=
7 > sparse=
8 > strip=
8 > strip=
9 > EOF
9 > EOF
10
10
11 $ echo a > show
11 $ echo a > show
12 $ echo x > hide
12 $ echo x > hide
13 $ hg ci -Aqm 'initial'
13 $ hg ci -Aqm 'initial'
14
14
15 $ echo b > show
15 $ echo b > show
16 $ echo y > hide
16 $ echo y > hide
17 $ echo aa > show2
17 $ echo aa > show2
18 $ echo xx > hide2
18 $ echo xx > hide2
19 $ hg ci -Aqm 'two'
19 $ hg ci -Aqm 'two'
20
20
21 Verify basic --include
21 Verify basic --include
22
22
23 $ hg up -q 0
23 $ hg up -q 0
24
24
25 Test that sparse pattern by default is interpreted as "glob:", and is interpreted relative to the root.
25 Test that sparse pattern by default is interpreted as "glob:", and is interpreted relative to the root.
26
26
27 $ hg debugsparse --reset
27 $ hg debugsparse --reset
28 $ hg debugsparse -X 'foo*bar'
28 $ hg debugsparse -X 'foo*bar'
29 $ cat .hg/sparse
29 $ cat .hg/sparse
30 [exclude]
30 [exclude]
31 foo*bar
31 foo*bar
32
32
33 $ mk() { mkdir -p "$1"; touch "$1"/"$2"; }
33 $ mk() { mkdir -p "$1"; touch "$1"/"$2"; }
34 $ mk 'foo' bar
34 $ mk 'foo' bar
35 $ mk 'foo-bar' x
35 $ mk 'foo-bar' x
36 $ mk 'unanchoredfoo-bar' x
36 $ mk 'unanchoredfoo-bar' x
37 #if no-windows
37 $ mk 'foo*bar' x
38 $ mk 'foo*bar' x
39 #endif
38 $ mk 'dir/foo-bar' x
40 $ mk 'dir/foo-bar' x
39 $ hg status --config rhg.on-unsupported=abort
41 $ hg status --config rhg.on-unsupported=abort
40 ? dir/foo-bar/x
42 ? dir/foo-bar/x
41 ? foo/bar
43 ? foo/bar
42 ? unanchoredfoo-bar/x
44 ? unanchoredfoo-bar/x
43 $ hg clean -a --no-confirm
45 $ hg clean -a --no-confirm
44 $ rm -r foo*bar
46 $ rm -r foo*bar
45 $ hg debugsparse --reset
47 $ hg debugsparse --reset
46
48
47 $ hg debugsparse --include 'hide'
49 $ hg debugsparse --include 'hide'
48 $ ls -A
50 $ ls -A
49 .hg
51 .hg
50 hide
52 hide
51
53
52 Absolute paths outside the repo should just be rejected
54 Absolute paths outside the repo should just be rejected
53
55
54 #if no-windows
56 #if no-windows
55 $ hg debugsparse --include /foo/bar
57 $ hg debugsparse --include /foo/bar
56 abort: paths cannot be absolute
58 abort: paths cannot be absolute
57 [255]
59 [255]
58 $ hg debugsparse --include '$TESTTMP/myrepo/hide'
60 $ hg debugsparse --include '$TESTTMP/myrepo/hide'
59
61
60 $ hg debugsparse --include '/root'
62 $ hg debugsparse --include '/root'
61 abort: paths cannot be absolute
63 abort: paths cannot be absolute
62 [255]
64 [255]
63 #else
65 #else
64 TODO: See if this can be made to fail the same way as on Unix
66 TODO: See if this can be made to fail the same way as on Unix
65 $ hg debugsparse --include /c/foo/bar
67 $ hg debugsparse --include /c/foo/bar
66 abort: paths cannot be absolute
68 abort: paths cannot be absolute
67 [255]
69 [255]
68 $ hg debugsparse --include '$TESTTMP/myrepo/hide'
70 $ hg debugsparse --include '$TESTTMP/myrepo/hide'
69
71
70 $ hg debugsparse --include '/c/root'
72 $ hg debugsparse --include '/c/root'
71 abort: paths cannot be absolute
73 abort: paths cannot be absolute
72 [255]
74 [255]
73 #endif
75 #endif
74
76
75 Paths should be treated as cwd-relative, not repo-root-relative
77 Paths should be treated as cwd-relative, not repo-root-relative
76 $ mkdir subdir && cd subdir
78 $ mkdir subdir && cd subdir
77 $ hg debugsparse --include path
79 $ hg debugsparse --include path
78 $ hg debugsparse
80 $ hg debugsparse
79 [include]
81 [include]
80 $TESTTMP/myrepo/hide
82 $TESTTMP/myrepo/hide
81 hide
83 hide
82 subdir/path
84 subdir/path
83
85
84 $ cd ..
86 $ cd ..
85 $ echo hello > subdir/file2.ext
87 $ echo hello > subdir/file2.ext
86 $ cd subdir
88 $ cd subdir
87 $ hg debugsparse --include '**.ext' # let us test globs
89 $ hg debugsparse --include '**.ext' # let us test globs
88 $ hg debugsparse --include 'path:abspath' # and a path: pattern
90 $ hg debugsparse --include 'path:abspath' # and a path: pattern
89 $ cd ..
91 $ cd ..
90 $ hg debugsparse
92 $ hg debugsparse
91 [include]
93 [include]
92 $TESTTMP/myrepo/hide
94 $TESTTMP/myrepo/hide
93 hide
95 hide
94 path:abspath
96 path:abspath
95 subdir/**.ext
97 subdir/**.ext
96 subdir/path
98 subdir/path
97
99
98 $ rm -rf subdir
100 $ rm -rf subdir
99
101
100 Verify commiting while sparse includes other files
102 Verify commiting while sparse includes other files
101
103
102 $ echo z > hide
104 $ echo z > hide
103 $ hg ci -Aqm 'edit hide'
105 $ hg ci -Aqm 'edit hide'
104 $ ls -A
106 $ ls -A
105 .hg
107 .hg
106 hide
108 hide
107 $ hg manifest
109 $ hg manifest
108 hide
110 hide
109 show
111 show
110
112
111 Verify --reset brings files back
113 Verify --reset brings files back
112
114
113 $ hg debugsparse --reset
115 $ hg debugsparse --reset
114 $ ls -A
116 $ ls -A
115 .hg
117 .hg
116 hide
118 hide
117 show
119 show
118 $ cat hide
120 $ cat hide
119 z
121 z
120 $ cat show
122 $ cat show
121 a
123 a
122
124
123 Verify 'hg debugsparse' default output
125 Verify 'hg debugsparse' default output
124
126
125 $ hg up -q null
127 $ hg up -q null
126 $ hg debugsparse --include 'show*'
128 $ hg debugsparse --include 'show*'
127
129
128 $ hg debugsparse
130 $ hg debugsparse
129 [include]
131 [include]
130 show*
132 show*
131
133
132 Verify update only writes included files
134 Verify update only writes included files
133
135
134 $ hg up -q 0
136 $ hg up -q 0
135 $ ls -A
137 $ ls -A
136 .hg
138 .hg
137 show
139 show
138
140
139 $ hg up -q 1
141 $ hg up -q 1
140 $ ls -A
142 $ ls -A
141 .hg
143 .hg
142 show
144 show
143 show2
145 show2
144
146
145 Verify status only shows included files
147 Verify status only shows included files
146
148
147 $ touch hide
149 $ touch hide
148 $ touch hide3
150 $ touch hide3
149 $ echo c > show
151 $ echo c > show
150 $ hg status
152 $ hg status
151 M show
153 M show
152
154
153 Adding an excluded file should fail
155 Adding an excluded file should fail
154
156
155 $ hg add hide3
157 $ hg add hide3
156 abort: cannot add 'hide3' - it is outside the sparse checkout
158 abort: cannot add 'hide3' - it is outside the sparse checkout
157 (include file with `hg debugsparse --include <pattern>` or use `hg add -s <file>` to include file directory while adding)
159 (include file with `hg debugsparse --include <pattern>` or use `hg add -s <file>` to include file directory while adding)
158 [255]
160 [255]
159
161
160 But adding a truly excluded file shouldn't count
162 But adding a truly excluded file shouldn't count
161
163
162 $ hg add hide3 -X hide3
164 $ hg add hide3 -X hide3
163
165
164 Verify deleting sparseness while a file has changes fails
166 Verify deleting sparseness while a file has changes fails
165
167
166 $ hg debugsparse --delete 'show*'
168 $ hg debugsparse --delete 'show*'
167 pending changes to 'hide'
169 pending changes to 'hide'
168 abort: cannot change sparseness due to pending changes (delete the files or use --force to bring them back dirty)
170 abort: cannot change sparseness due to pending changes (delete the files or use --force to bring them back dirty)
169 [255]
171 [255]
170
172
171 Verify deleting sparseness with --force brings back files
173 Verify deleting sparseness with --force brings back files
172
174
173 $ hg debugsparse -f --delete 'show*'
175 $ hg debugsparse -f --delete 'show*'
174 pending changes to 'hide'
176 pending changes to 'hide'
175 $ ls -A
177 $ ls -A
176 .hg
178 .hg
177 hide
179 hide
178 hide2
180 hide2
179 hide3
181 hide3
180 show
182 show
181 show2
183 show2
182 $ hg st
184 $ hg st
183 M hide
185 M hide
184 M show
186 M show
185 ? hide3
187 ? hide3
186
188
187 Verify editing sparseness fails if pending changes
189 Verify editing sparseness fails if pending changes
188
190
189 $ hg debugsparse --include 'show*'
191 $ hg debugsparse --include 'show*'
190 pending changes to 'hide'
192 pending changes to 'hide'
191 abort: could not update sparseness due to pending changes
193 abort: could not update sparseness due to pending changes
192 [255]
194 [255]
193
195
194 Verify adding sparseness hides files
196 Verify adding sparseness hides files
195
197
196 $ hg debugsparse -f --exclude 'hide*'
198 $ hg debugsparse -f --exclude 'hide*'
197 pending changes to 'hide'
199 pending changes to 'hide'
198 $ ls -A
200 $ ls -A
199 .hg
201 .hg
200 hide
202 hide
201 hide3
203 hide3
202 show
204 show
203 show2
205 show2
204 $ hg st
206 $ hg st
205 M show
207 M show
206
208
207 $ hg up -qC .
209 $ hg up -qC .
208 TODO: add an option to purge to also purge files outside the sparse config?
210 TODO: add an option to purge to also purge files outside the sparse config?
209 $ hg purge --all --config extensions.purge=
211 $ hg purge --all --config extensions.purge=
210 $ ls -A
212 $ ls -A
211 .hg
213 .hg
212 hide
214 hide
213 hide3
215 hide3
214 show
216 show
215 show2
217 show2
216 For now, manually remove the files
218 For now, manually remove the files
217 $ rm hide hide3
219 $ rm hide hide3
218
220
219 Verify rebase temporarily includes excluded files
221 Verify rebase temporarily includes excluded files
220
222
221 $ hg rebase -d 1 -r 2 --config extensions.rebase=
223 $ hg rebase -d 1 -r 2 --config extensions.rebase=
222 rebasing 2:b91df4f39e75 tip "edit hide"
224 rebasing 2:b91df4f39e75 tip "edit hide"
223 temporarily included 2 file(s) in the sparse checkout for merging
225 temporarily included 2 file(s) in the sparse checkout for merging
224 merging hide
226 merging hide
225 warning: conflicts while merging hide! (edit, then use 'hg resolve --mark')
227 warning: conflicts while merging hide! (edit, then use 'hg resolve --mark')
226 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
228 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
227 [240]
229 [240]
228
230
229 $ hg debugsparse
231 $ hg debugsparse
230 [exclude]
232 [exclude]
231 hide*
233 hide*
232
234
233 Temporarily Included Files (for merge/rebase):
235 Temporarily Included Files (for merge/rebase):
234 hide
236 hide
235
237
236 $ cat hide
238 $ cat hide
237 <<<<<<< dest: 39278f7c08a9 - test: two
239 <<<<<<< dest: 39278f7c08a9 - test: two
238 y
240 y
239 =======
241 =======
240 z
242 z
241 >>>>>>> source: b91df4f39e75 - test: edit hide
243 >>>>>>> source: b91df4f39e75 - test: edit hide
242
244
243 Verify aborting a rebase cleans up temporary files
245 Verify aborting a rebase cleans up temporary files
244
246
245 $ hg rebase --abort --config extensions.rebase=
247 $ hg rebase --abort --config extensions.rebase=
246 cleaned up 1 temporarily added file(s) from the sparse checkout
248 cleaned up 1 temporarily added file(s) from the sparse checkout
247 rebase aborted
249 rebase aborted
248 $ rm hide.orig
250 $ rm hide.orig
249
251
250 $ ls -A
252 $ ls -A
251 .hg
253 .hg
252 show
254 show
253 show2
255 show2
254
256
255 Verify merge fails if merging excluded files
257 Verify merge fails if merging excluded files
256
258
257 $ hg up -q 1
259 $ hg up -q 1
258 $ hg merge -r 2
260 $ hg merge -r 2
259 temporarily included 2 file(s) in the sparse checkout for merging
261 temporarily included 2 file(s) in the sparse checkout for merging
260 merging hide
262 merging hide
261 warning: conflicts while merging hide! (edit, then use 'hg resolve --mark')
263 warning: conflicts while merging hide! (edit, then use 'hg resolve --mark')
262 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
264 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
263 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
265 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
264 [1]
266 [1]
265 $ hg debugsparse
267 $ hg debugsparse
266 [exclude]
268 [exclude]
267 hide*
269 hide*
268
270
269 Temporarily Included Files (for merge/rebase):
271 Temporarily Included Files (for merge/rebase):
270 hide
272 hide
271
273
272 $ hg up -C .
274 $ hg up -C .
273 cleaned up 1 temporarily added file(s) from the sparse checkout
275 cleaned up 1 temporarily added file(s) from the sparse checkout
274 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
276 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
275 $ hg debugsparse
277 $ hg debugsparse
276 [exclude]
278 [exclude]
277 hide*
279 hide*
278
280
279
281
280 Multiple -I and -X can be passed at once
282 Multiple -I and -X can be passed at once
281
283
282 $ hg debugsparse --reset -I '*2' -X 'hide2'
284 $ hg debugsparse --reset -I '*2' -X 'hide2'
283 $ ls -A
285 $ ls -A
284 .hg
286 .hg
285 hide.orig
287 hide.orig
286 show2
288 show2
287 $ hg debugsparse --reset -X 'hide*'
289 $ hg debugsparse --reset -X 'hide*'
288
290
289 Verify strip -k resets dirstate correctly
291 Verify strip -k resets dirstate correctly
290
292
291 $ hg status
293 $ hg status
292 $ hg debugsparse
294 $ hg debugsparse
293 [exclude]
295 [exclude]
294 hide*
296 hide*
295
297
296 $ hg log -r . -T '{rev}\n' --stat
298 $ hg log -r . -T '{rev}\n' --stat
297 1
299 1
298 hide | 2 +-
300 hide | 2 +-
299 hide2 | 1 +
301 hide2 | 1 +
300 show | 2 +-
302 show | 2 +-
301 show2 | 1 +
303 show2 | 1 +
302 4 files changed, 4 insertions(+), 2 deletions(-)
304 4 files changed, 4 insertions(+), 2 deletions(-)
303
305
304 $ hg strip -r . -k
306 $ hg strip -r . -k
305 saved backup bundle to $TESTTMP/myrepo/.hg/strip-backup/39278f7c08a9-ce59e002-backup.hg
307 saved backup bundle to $TESTTMP/myrepo/.hg/strip-backup/39278f7c08a9-ce59e002-backup.hg
306 $ hg status
308 $ hg status
307 M show
309 M show
308 ? show2
310 ? show2
309
311
310 Verify rebase succeeds if all changed files are in sparse checkout
312 Verify rebase succeeds if all changed files are in sparse checkout
311
313
312 $ hg commit -Aqm "add show2"
314 $ hg commit -Aqm "add show2"
313 $ hg rebase -d 1 --config extensions.rebase=
315 $ hg rebase -d 1 --config extensions.rebase=
314 rebasing 2:bdde55290160 tip "add show2"
316 rebasing 2:bdde55290160 tip "add show2"
315 saved backup bundle to $TESTTMP/myrepo/.hg/strip-backup/bdde55290160-216ed9c6-rebase.hg
317 saved backup bundle to $TESTTMP/myrepo/.hg/strip-backup/bdde55290160-216ed9c6-rebase.hg
316
318
317 Verify log --sparse only shows commits that affect the sparse checkout
319 Verify log --sparse only shows commits that affect the sparse checkout
318
320
319 $ hg log -T '{rev} '
321 $ hg log -T '{rev} '
320 2 1 0 (no-eol)
322 2 1 0 (no-eol)
321 $ hg log --sparse -T '{rev} '
323 $ hg log --sparse -T '{rev} '
322 2 0 (no-eol)
324 2 0 (no-eol)
323
325
324 Test status on a file in a subdir
326 Test status on a file in a subdir
325
327
326 $ mkdir -p dir1/dir2
328 $ mkdir -p dir1/dir2
327 $ touch dir1/dir2/file
329 $ touch dir1/dir2/file
328 $ hg debugsparse -I dir1/dir2
330 $ hg debugsparse -I dir1/dir2
329 $ hg status
331 $ hg status
330 ? dir1/dir2/file
332 ? dir1/dir2/file
331
333
332 Mix files and subdirectories, both "glob:" and unprefixed
334 Mix files and subdirectories, both "glob:" and unprefixed
333
335
334 $ hg debugsparse --reset
336 $ hg debugsparse --reset
335 $ touch dir1/notshown
337 $ touch dir1/notshown
336 $ hg commit -A dir1/notshown -m "notshown"
338 $ hg commit -A dir1/notshown -m "notshown"
337 $ hg debugsparse --include 'dir1/dir2'
339 $ hg debugsparse --include 'dir1/dir2'
338 $ "$PYTHON" $TESTDIR/list-tree.py . | grep -E -v '\.[\/]\.hg'
340 $ "$PYTHON" $TESTDIR/list-tree.py . | grep -E -v '\.[\/]\.hg'
339 ./
341 ./
340 ./dir1/
342 ./dir1/
341 ./dir1/dir2/
343 ./dir1/dir2/
342 ./dir1/dir2/file
344 ./dir1/dir2/file
343 ./hide.orig
345 ./hide.orig
344 $ hg debugsparse --delete 'dir1/dir2'
346 $ hg debugsparse --delete 'dir1/dir2'
345 $ hg debugsparse --include 'glob:dir1/dir2'
347 $ hg debugsparse --include 'glob:dir1/dir2'
346 $ "$PYTHON" $TESTDIR/list-tree.py . | grep -E -v '\.[\/]\.hg'
348 $ "$PYTHON" $TESTDIR/list-tree.py . | grep -E -v '\.[\/]\.hg'
347 ./
349 ./
348 ./dir1/
350 ./dir1/
349 ./dir1/dir2/
351 ./dir1/dir2/
350 ./dir1/dir2/file
352 ./dir1/dir2/file
351 ./hide.orig
353 ./hide.orig
352
354
353 Test that add -s adds dirs to sparse profile
355 Test that add -s adds dirs to sparse profile
354
356
355 $ hg debugsparse --reset
357 $ hg debugsparse --reset
356 $ hg debugsparse --include empty
358 $ hg debugsparse --include empty
357 $ hg debugsparse
359 $ hg debugsparse
358 [include]
360 [include]
359 empty
361 empty
360
362
361
363
362 $ mkdir add
364 $ mkdir add
363 $ touch add/foo
365 $ touch add/foo
364 $ touch add/bar
366 $ touch add/bar
365 $ hg add add/foo
367 $ hg add add/foo
366 abort: cannot add 'add/foo' - it is outside the sparse checkout
368 abort: cannot add 'add/foo' - it is outside the sparse checkout
367 (include file with `hg debugsparse --include <pattern>` or use `hg add -s <file>` to include file directory while adding)
369 (include file with `hg debugsparse --include <pattern>` or use `hg add -s <file>` to include file directory while adding)
368 [255]
370 [255]
369 $ hg add -s add/foo
371 $ hg add -s add/foo
370 $ hg st
372 $ hg st
371 A add/foo
373 A add/foo
372 ? add/bar
374 ? add/bar
373 $ hg debugsparse
375 $ hg debugsparse
374 [include]
376 [include]
375 add
377 add
376 empty
378 empty
377
379
378 $ hg add -s add/*
380 $ hg add -s add/*
379 add/foo already tracked!
381 add/foo already tracked!
380 $ hg st
382 $ hg st
381 A add/bar
383 A add/bar
382 A add/foo
384 A add/foo
383 $ hg debugsparse
385 $ hg debugsparse
384 [include]
386 [include]
385 add
387 add
386 empty
388 empty
387
389
388
390
389 $ cd ..
391 $ cd ..
390
392
391 Test non-sparse repos work while sparse is loaded
393 Test non-sparse repos work while sparse is loaded
392 $ hg init sparserepo
394 $ hg init sparserepo
393 $ hg init nonsparserepo
395 $ hg init nonsparserepo
394 $ cd sparserepo
396 $ cd sparserepo
395 $ cat > .hg/hgrc <<EOF
397 $ cat > .hg/hgrc <<EOF
396 > [extensions]
398 > [extensions]
397 > sparse=
399 > sparse=
398 > EOF
400 > EOF
399 $ cd ../nonsparserepo
401 $ cd ../nonsparserepo
400 $ echo x > x && hg add x && hg commit -qAm x
402 $ echo x > x && hg add x && hg commit -qAm x
401 $ cd ../sparserepo
403 $ cd ../sparserepo
402 $ hg clone ../nonsparserepo ../nonsparserepo2
404 $ hg clone ../nonsparserepo ../nonsparserepo2
403 updating to branch default
405 updating to branch default
404 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
406 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
405
407
406 Test debugrebuilddirstate
408 Test debugrebuilddirstate
407 $ cd ../sparserepo
409 $ cd ../sparserepo
408 $ touch included
410 $ touch included
409 $ touch excluded
411 $ touch excluded
410 $ hg add included excluded
412 $ hg add included excluded
411 $ hg commit -m 'a commit' -q
413 $ hg commit -m 'a commit' -q
412 $ cp .hg/dirstate ../dirstateboth
414 $ cp .hg/dirstate ../dirstateboth
413 $ hg debugsparse -X excluded
415 $ hg debugsparse -X excluded
414 $ cp ../dirstateboth .hg/dirstate
416 $ cp ../dirstateboth .hg/dirstate
415 $ hg debugrebuilddirstate
417 $ hg debugrebuilddirstate
416 $ hg debugdirstate
418 $ hg debugdirstate
417 n 0 -1 unset included
419 n 0 -1 unset included
418
420
419 Test debugdirstate --minimal where file is in the parent manifest but not the
421 Test debugdirstate --minimal where file is in the parent manifest but not the
420 dirstate
422 dirstate
421 $ hg debugsparse -X included
423 $ hg debugsparse -X included
422 $ hg debugdirstate
424 $ hg debugdirstate
423 $ cp .hg/dirstate ../dirstateallexcluded
425 $ cp .hg/dirstate ../dirstateallexcluded
424 $ hg debugsparse --reset
426 $ hg debugsparse --reset
425 $ hg debugsparse -X excluded
427 $ hg debugsparse -X excluded
426 $ cp ../dirstateallexcluded .hg/dirstate
428 $ cp ../dirstateallexcluded .hg/dirstate
427 $ touch includedadded
429 $ touch includedadded
428 $ hg add includedadded
430 $ hg add includedadded
429 $ hg debugdirstate --no-dates
431 $ hg debugdirstate --no-dates
430 a 0 -1 unset includedadded
432 a 0 -1 unset includedadded
431 $ hg debugrebuilddirstate --minimal
433 $ hg debugrebuilddirstate --minimal
432 $ hg debugdirstate --no-dates
434 $ hg debugdirstate --no-dates
433 n 0 -1 unset included
435 n 0 -1 unset included
434 a 0 -1 * includedadded (glob)
436 a 0 -1 * includedadded (glob)
435
437
436 Test debugdirstate --minimal where a file is not in parent manifest
438 Test debugdirstate --minimal where a file is not in parent manifest
437 but in the dirstate. This should take into account excluded files in the
439 but in the dirstate. This should take into account excluded files in the
438 manifest
440 manifest
439 $ cp ../dirstateboth .hg/dirstate
441 $ cp ../dirstateboth .hg/dirstate
440 $ touch includedadded
442 $ touch includedadded
441 $ hg add includedadded
443 $ hg add includedadded
442 $ touch excludednomanifest
444 $ touch excludednomanifest
443 $ hg add excludednomanifest
445 $ hg add excludednomanifest
444 $ cp .hg/dirstate ../moreexcluded
446 $ cp .hg/dirstate ../moreexcluded
445 $ hg forget excludednomanifest
447 $ hg forget excludednomanifest
446 $ rm excludednomanifest
448 $ rm excludednomanifest
447 $ hg debugsparse -X excludednomanifest
449 $ hg debugsparse -X excludednomanifest
448 $ cp ../moreexcluded .hg/dirstate
450 $ cp ../moreexcluded .hg/dirstate
449 $ hg manifest
451 $ hg manifest
450 excluded
452 excluded
451 included
453 included
452 We have files in the dirstate that are included and excluded. Some are in the
454 We have files in the dirstate that are included and excluded. Some are in the
453 manifest and some are not.
455 manifest and some are not.
454 $ hg debugdirstate --no-dates
456 $ hg debugdirstate --no-dates
455 n * excluded (glob)
457 n * excluded (glob)
456 a * excludednomanifest (glob)
458 a * excludednomanifest (glob)
457 n * included (glob)
459 n * included (glob)
458 a * includedadded (glob)
460 a * includedadded (glob)
459 $ hg debugrebuilddirstate --minimal
461 $ hg debugrebuilddirstate --minimal
460 $ hg debugdirstate --no-dates
462 $ hg debugdirstate --no-dates
461 n * included (glob)
463 n * included (glob)
462 a * includedadded (glob)
464 a * includedadded (glob)
463
465
General Comments 0
You need to be logged in to leave comments. Login now