# HG changeset patch # User Matt Mackall # Date 2010-11-01 19:18:42 # Node ID e255a5dc29e6d0baaf9544c1005c7c3c6a9ce164 # Parent ae163a0a3cd098760e0af0e71e9be8088c1d0fa0 dirstate: skip optimization on case-folding FS (issue2440) diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py --- a/mercurial/dirstate.py +++ b/mercurial/dirstate.py @@ -485,11 +485,6 @@ class dirstate(object): work = [] wadd = work.append - if self._checkcase: - normalize = self._normalize - else: - normalize = lambda x, y: x - exact = skipstep3 = False if matchfn == match.exact: # match.exact exact = True @@ -497,6 +492,12 @@ class dirstate(object): elif match.files() and not match.anypats(): # match.match, no patterns skipstep3 = True + if self._checkcase: + normalize = self._normalize + skipstep3 = False + else: + normalize = lambda x, y: x + files = sorted(match.files()) subrepos.sort() i, j = 0, 0