Show More
@@ -1351,7 +1351,9 b' class localrepository(repo.repository):' | |||
|
1351 | 1351 | |
|
1352 | 1352 | if not parentworking: |
|
1353 | 1353 | def bad(f, msg): |
|
1354 | if f not in ctx1: | |
|
1354 | # 'f' may be a directory pattern from 'match.files()', | |
|
1355 | # so 'f not in ctx1' is not enough | |
|
1356 | if f not in ctx1 and f not in ctx1.dirs(): | |
|
1355 | 1357 | self.ui.warn('%s: %s\n' % (self.dirstate.pathto(f), msg)) |
|
1356 | 1358 | match.bad = bad |
|
1357 | 1359 |
@@ -295,3 +295,39 b" hg status of binary file starting with '" | |||
|
295 | 295 | $ hg ci -q -A -m 'add another file' |
|
296 | 296 | $ hg status -A --rev 1:2 010a |
|
297 | 297 | C 010a |
|
298 | ||
|
299 | $ cd .. | |
|
300 | ||
|
301 | test "hg status" with "directory pattern" which matches against files | |
|
302 | only known on target revision. | |
|
303 | ||
|
304 | $ hg init repo6 | |
|
305 | $ cd repo6 | |
|
306 | ||
|
307 | $ echo a > a.txt | |
|
308 | $ hg add a.txt | |
|
309 | $ hg commit -m '#0' | |
|
310 | $ mkdir -p 1/2/3/4/5 | |
|
311 | $ echo b > 1/2/3/4/5/b.txt | |
|
312 | $ hg add 1/2/3/4/5/b.txt | |
|
313 | $ hg commit -m '#1' | |
|
314 | ||
|
315 | $ hg update -C 0 > /dev/null | |
|
316 | $ hg status -A | |
|
317 | C a.txt | |
|
318 | ||
|
319 | the directory matching against specified pattern should be removed, | |
|
320 | because directory existence prevents 'dirstate.walk()' from showing | |
|
321 | warning message about such pattern. | |
|
322 | ||
|
323 | $ test ! -d 1 | |
|
324 | $ hg status -A --rev 1 1/2/3/4/5/b.txt | |
|
325 | R 1/2/3/4/5/b.txt | |
|
326 | $ hg status -A --rev 1 1/2/3/4/5 | |
|
327 | R 1/2/3/4/5/b.txt | |
|
328 | $ hg status -A --rev 1 1/2/3 | |
|
329 | R 1/2/3/4/5/b.txt | |
|
330 | $ hg status -A --rev 1 1 | |
|
331 | R 1/2/3/4/5/b.txt | |
|
332 | ||
|
333 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now