Show More
@@ -11,7 +11,6 b' from mercurial import (' | |||||
11 | changegroup, |
|
11 | changegroup, | |
12 | hg, |
|
12 | hg, | |
13 | narrowspec, |
|
13 | narrowspec, | |
14 | scmutil, |
|
|||
15 | ) |
|
14 | ) | |
16 |
|
15 | |||
17 | from . import ( |
|
16 | from . import ( | |
@@ -46,23 +45,6 b' def wraprepo(repo):' | |||||
46 | narrowrevlog.makenarrowfilelog(fl, self.narrowmatch()) |
|
45 | narrowrevlog.makenarrowfilelog(fl, self.narrowmatch()) | |
47 | return fl |
|
46 | return fl | |
48 |
|
47 | |||
49 | # I'm not sure this is the right place to do this filter. |
|
|||
50 | # context._manifestmatches() would probably be better, or perhaps |
|
|||
51 | # move it to a later place, in case some of the callers do want to know |
|
|||
52 | # which directories changed. This seems to work for now, though. |
|
|||
53 | def status(self, *args, **kwargs): |
|
|||
54 | s = super(narrowrepository, self).status(*args, **kwargs) |
|
|||
55 | narrowmatch = self.narrowmatch() |
|
|||
56 | modified = list(filter(narrowmatch, s.modified)) |
|
|||
57 | added = list(filter(narrowmatch, s.added)) |
|
|||
58 | removed = list(filter(narrowmatch, s.removed)) |
|
|||
59 | deleted = list(filter(narrowmatch, s.deleted)) |
|
|||
60 | unknown = list(filter(narrowmatch, s.unknown)) |
|
|||
61 | ignored = list(filter(narrowmatch, s.ignored)) |
|
|||
62 | clean = list(filter(narrowmatch, s.clean)) |
|
|||
63 | return scmutil.status(modified, added, removed, deleted, unknown, |
|
|||
64 | ignored, clean) |
|
|||
65 |
|
||||
66 | def _makedirstate(self): |
|
48 | def _makedirstate(self): | |
67 | dirstate = super(narrowrepository, self)._makedirstate() |
|
49 | dirstate = super(narrowrepository, self)._makedirstate() | |
68 | return narrowdirstate.wrapdirstate(self, dirstate) |
|
50 | return narrowdirstate.wrapdirstate(self, dirstate) |
@@ -372,6 +372,10 b' class basectx(object):' | |||||
372 | for rfiles, sfiles in zip(r, s): |
|
372 | for rfiles, sfiles in zip(r, s): | |
373 | rfiles.extend("%s/%s" % (subpath, f) for f in sfiles) |
|
373 | rfiles.extend("%s/%s" % (subpath, f) for f in sfiles) | |
374 |
|
374 | |||
|
375 | narrowmatch = self._repo.narrowmatch() | |||
|
376 | if not narrowmatch.always(): | |||
|
377 | for l in r: | |||
|
378 | l[:] = list(filter(narrowmatch, l)) | |||
375 | for l in r: |
|
379 | for l in r: | |
376 | l.sort() |
|
380 | l.sort() | |
377 |
|
381 |
General Comments 0
You need to be logged in to leave comments.
Login now