Mercurial > public > mercurial-scm > hg-stable
diff mercurial/cmdutil.py @ 14138:c18204fd35b0
scmutil: introduce casecollisionauditor
and cleaning up portability functions
author | Adrian Buehlmann <adrian@cadifra.com> |
---|---|
date | Sat, 30 Apr 2011 23:27:00 +0200 |
parents | 81e6d42b3228 |
children | 135e244776f0 |
line wrap: on
line diff
--- a/mercurial/cmdutil.py Sun May 01 16:11:42 2011 +0200 +++ b/mercurial/cmdutil.py Sat Apr 30 23:27:00 2011 +0200 @@ -1314,14 +1314,15 @@ match.bad = lambda x, y: bad.append(x) or oldbad(x, y) names = [] wctx = repo[None] - existing = None - if scmutil.showportabilityalert(ui): - existing = dict([(fn.lower(), fn) for fn in wctx]) + cca = None + abort, warn = scmutil.checkportabilityalert(ui) + if abort or warn: + cca = scmutil.casecollisionauditor(ui, abort, wctx) for f in repo.walk(match): exact = match.exact(f) if exact or f not in repo.dirstate: - if existing: - scmutil.checkcasecollision(ui, f, existing) + if cca: + cca(f) names.append(f) if ui.verbose or not exact: ui.status(_('adding %s\n') % match.rel(join(f)))