##// END OF EJS Templates
context: provide an efficient iterator for workingctx...
Matt Mackall -
r14129:81e6d42b default
parent child Browse files
Show More
@@ -1314,11 +1314,9 b' def add(ui, repo, match, dryrun, listsub'
1314 match.bad = lambda x, y: bad.append(x) or oldbad(x, y)
1314 match.bad = lambda x, y: bad.append(x) or oldbad(x, y)
1315 names = []
1315 names = []
1316 wctx = repo[None]
1316 wctx = repo[None]
1317 wctx.status(clean=True)
1318 existing = None
1317 existing = None
1319 if scmutil.showportabilityalert(ui):
1318 if scmutil.showportabilityalert(ui):
1320 existing = dict([(fn.lower(), fn) for fn in
1319 existing = dict([(fn.lower(), fn) for fn in wctx])
1321 wctx.added() + wctx.clean() + wctx.modified()])
1322 for f in repo.walk(match):
1320 for f in repo.walk(match):
1323 exact = match.exact(f)
1321 exact = match.exact(f)
1324 if exact or f not in repo.dirstate:
1322 if exact or f not in repo.dirstate:
@@ -661,6 +661,12 b' class workingctx(changectx):'
661
661
662 return man
662 return man
663
663
664 def __iter__(self):
665 d = self._repo.dirstate
666 for f in d:
667 if d[f] != 'r':
668 yield f
669
664 @propertycache
670 @propertycache
665 def _status(self):
671 def _status(self):
666 return self._repo.status()[:4]
672 return self._repo.status()[:4]
General Comments 0
You need to be logged in to leave comments. Login now