mercurial/cmdutil.py
changeset 14068 04ce8fa1015d
parent 14064 e4bfb9c337f3
child 14098 9f5a0acb0056
--- a/mercurial/cmdutil.py	Sat Apr 30 11:08:24 2011 +0200
+++ b/mercurial/cmdutil.py	Sat Apr 30 12:39:46 2011 +0200
@@ -1314,9 +1314,16 @@
     match.bad = lambda x, y: bad.append(x) or oldbad(x, y)
     names = []
     wctx = repo[None]
+    wctx.status(clean=True)
+    existing = None
+    if scmutil.showportabilityalert(ui):
+        existing = dict([(fn.lower(), fn) for fn in
+                         wctx.added() + wctx.clean() + wctx.modified()])
     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)
             names.append(f)
             if ui.verbose or not exact:
                 ui.status(_('adding %s\n') % match.rel(join(f)))