Show More
@@ -2481,14 +2481,15 b' def remove(ui, repo, m, prefix, after, f' | |||||
2481 | for f in files: |
|
2481 | for f in files: | |
2482 | def insubrepo(): |
|
2482 | def insubrepo(): | |
2483 | for subpath in wctx.substate: |
|
2483 | for subpath in wctx.substate: | |
2484 | if f.startswith(subpath): |
|
2484 | if f.startswith(subpath + '/'): | |
2485 | return True |
|
2485 | return True | |
2486 | return False |
|
2486 | return False | |
2487 |
|
2487 | |||
2488 | count += 1 |
|
2488 | count += 1 | |
2489 | ui.progress(_('deleting'), count, total=total, unit=_('files')) |
|
2489 | ui.progress(_('deleting'), count, total=total, unit=_('files')) | |
2490 | isdir = f in deleteddirs or wctx.hasdir(f) |
|
2490 | isdir = f in deleteddirs or wctx.hasdir(f) | |
2491 |
if f in repo.dirstate or isdir or f == '.' |
|
2491 | if (f in repo.dirstate or isdir or f == '.' | |
|
2492 | or insubrepo() or f in subs): | |||
2492 | continue |
|
2493 | continue | |
2493 |
|
2494 | |||
2494 | if repo.wvfs.exists(f): |
|
2495 | if repo.wvfs.exists(f): |
@@ -53,6 +53,15 b' test handling .hgsubstate "added" explic' | |||||
53 | 7cf8cfea66e410e8e3336508dfeec07b3192de51 |
|
53 | 7cf8cfea66e410e8e3336508dfeec07b3192de51 | |
54 | .hgsub .hgsubstate |
|
54 | .hgsub .hgsubstate | |
55 |
|
55 | |||
|
56 | Subrepopath which overlaps with filepath, does not change warnings in remove() | |||
|
57 | ||||
|
58 | $ mkdir snot | |||
|
59 | $ touch snot/file | |||
|
60 | $ hg remove -S snot/file | |||
|
61 | not removing snot/file: file is untracked | |||
|
62 | [1] | |||
|
63 | $ rm -r snot | |||
|
64 | ||||
56 | Revert subrepo and test subrepo fileset keyword: |
|
65 | Revert subrepo and test subrepo fileset keyword: | |
57 |
|
66 | |||
58 | $ echo b > s/a |
|
67 | $ echo b > s/a |
General Comments 0
You need to be logged in to leave comments.
Login now