[PATCH 2 of 3] Resolve issue 1092 (case clash in hg add)

Paul Moore p.f.moore at gmail.com
Tue Apr 22 17:10:55 CDT 2008


# HG changeset patch
# User "Paul Moore <p.f.moore at gmail.com>"
# Date 1208894385 -3600
# Node ID 6e1e2fc3455a242d8ce2ea931b598670723912eb
# Parent  47aabfeb37f4a12d015b809afef81cb817e18972
Resolve issue 1092 (case clash in hg add)

Do this by converting the filenames returned by cmdutil.walk to match the
filesystem case. This is the simplest change that works - converting case at a
lower level may introduce issues elsewhere.

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -33,6 +33,7 @@
     names = []
     for src, abs, rel, exact in cmdutil.walk(repo, pats, opts,
                                              badmatch=util.always):
+        abs = util.filesystem_case(abs)
         if exact:
             if ui.verbose:
                 ui.status(_('adding %s\n') % rel)


More information about the Mercurial-devel mailing list