Show More
@@ -14,3 +14,11 b' server-specified narrowspec format.' | |||
|
14 | 14 | |
|
15 | 15 | narrowrepo.setnarrowpats() or narrowspec.save() need to make sure |
|
16 | 16 | they're holding the wlock. |
|
17 | ||
|
18 | The follinwg places do an unrestricted dirstate walk (including files outside the | |
|
19 | narrowspec). Some of them should perhaps not do that. | |
|
20 | ||
|
21 | * debugfileset | |
|
22 | * perfwalk | |
|
23 | * sparse (but restricted to sparse config) | |
|
24 | * largefiles |
@@ -26,13 +26,6 b' def wrapdirstate(repo, dirstate):' | |||
|
26 | 26 | return _wrapper |
|
27 | 27 | |
|
28 | 28 | class narrowdirstate(dirstate.__class__): |
|
29 | def walk(self, match, subrepos, unknown, ignored, full=True, | |
|
30 | narrowonly=True): | |
|
31 | if narrowonly: | |
|
32 | match = repo.narrowmatch(match, includeexact=True) | |
|
33 | return super(narrowdirstate, self).walk(match, subrepos, unknown, | |
|
34 | ignored, full) | |
|
35 | ||
|
36 | 29 | # Prevent adding/editing/copying/deleting files that are outside the |
|
37 | 30 | # sparse checkout |
|
38 | 31 | @_editfunc |
@@ -2044,6 +2044,7 b' def add(ui, repo, match, prefix, explici' | |||
|
2044 | 2044 | if abort or warn: |
|
2045 | 2045 | cca = scmutil.casecollisionauditor(ui, abort, repo.dirstate) |
|
2046 | 2046 | |
|
2047 | match = repo.narrowmatch(match, includeexact=True) | |
|
2047 | 2048 | badmatch = matchmod.badmatch(match, badfn) |
|
2048 | 2049 | dirstate = repo.dirstate |
|
2049 | 2050 | # We don't want to just call wctx.walk here, since it would return a lot of |
@@ -1098,6 +1098,7 b' def _interestingfiles(repo, matcher):' | |||
|
1098 | 1098 | |
|
1099 | 1099 | ctx = repo[None] |
|
1100 | 1100 | dirstate = repo.dirstate |
|
1101 | matcher = repo.narrowmatch(matcher, includeexact=True) | |
|
1101 | 1102 | walkresults = dirstate.walk(matcher, subrepos=sorted(ctx.substate), |
|
1102 | 1103 | unknown=True, ignored=False, full=False) |
|
1103 | 1104 | for abs, st in walkresults.iteritems(): |
General Comments 0
You need to be logged in to leave comments.
Login now