Mercurial > public > mercurial-scm > hg
comparison mercurial/cmdutil.py @ 14129:81e6d42b3228
context: provide an efficient iterator for workingctx
This avoids needing to call status or build a synthetic manifest.
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sun, 01 May 2011 08:29:50 -0500 |
parents | 9f5a0acb0056 |
children | c18204fd35b0 |
comparison
equal
deleted
inserted
replaced
14128:0386b51dd749 | 14129:81e6d42b3228 |
---|---|
1312 bad = [] | 1312 bad = [] |
1313 oldbad = match.bad | 1313 oldbad = match.bad |
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: |
1325 if existing: | 1323 if existing: |
1326 scmutil.checkcasecollision(ui, f, existing) | 1324 scmutil.checkcasecollision(ui, f, existing) |