--- 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)))