mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 07:17:55 +03:00
dirstate.walk: remove subrepo and .hg from results before step 3
An upcoming patch will speed dirstate.walk up by not querying the results dict when it is empty. This ensures it is in some common cases. This should be safe because subrepos and .hg aren't part of the dirstate.
This commit is contained in:
parent
666c5947d4
commit
68d46b6a0a
@ -698,6 +698,10 @@ class dirstate(object):
|
||||
elif nf in dmap and matchfn(nf):
|
||||
results[nf] = None
|
||||
|
||||
for s in subrepos:
|
||||
del results[s]
|
||||
del results['.hg']
|
||||
|
||||
# step 3: report unseen items in the dmap hash
|
||||
if not skipstep3 and not exact:
|
||||
visit = sorted([f for f in dmap if f not in results and matchfn(f)])
|
||||
@ -725,9 +729,6 @@ class dirstate(object):
|
||||
nf = iter(visit).next
|
||||
for st in util.statfiles([join(i) for i in visit]):
|
||||
results[nf()] = st
|
||||
for s in subrepos:
|
||||
del results[s]
|
||||
del results['.hg']
|
||||
return results
|
||||
|
||||
def status(self, match, subrepos, ignored, clean, unknown):
|
||||
|
Loading…
Reference in New Issue
Block a user