D1343: dirstate: move dropping of folded filenames into the dirstate map
mbthomas (Mark Thomas)
phabricator at mercurial-scm.org
Fri Nov 17 17:29:06 EST 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG6326579352cf: dirstate: move dropping of folded filenames into the dirstate map (authored by mbthomas, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D1343?vs=3517&id=3616
REVISION DETAIL
https://phab.mercurial-scm.org/D1343
AFFECTED FILES
mercurial/dirstate.py
CHANGE DETAILS
diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -387,11 +387,6 @@
return self._map.copymap
def _droppath(self, f):
- if "filefoldmap" in self._map.__dict__:
- normed = util.normcase(f)
- if normed in self._map.filefoldmap:
- del self._map.filefoldmap[normed]
-
self._updatedfiles.add(f)
def _addpath(self, f, state, mode, size, mtime):
@@ -1213,9 +1208,6 @@
- `dirfoldmap` is a dict mapping normalized directory names to the
denormalized form that they appear as in the dirstate.
-
- Once instantiated, the filefoldmap and dirfoldmap views must be maintained
- by the caller.
"""
def __init__(self, ui, opener, root):
@@ -1297,6 +1289,9 @@
"""
if oldstate not in "?r" and "dirs" in self.__dict__:
self.dirs.delpath(f)
+ if "filefoldmap" in self.__dict__:
+ normed = util.normcase(f)
+ self.filefoldmap.pop(normed, None)
self._map[f] = dirstatetuple('r', 0, size, 0)
self.nonnormalset.add(f)
@@ -1309,6 +1304,9 @@
if exists:
if oldstate != "r" and "dirs" in self.__dict__:
self.dirs.delpath(f)
+ if "filefoldmap" in self.__dict__:
+ normed = util.normcase(f)
+ self.filefoldmap.pop(normed, None)
self.nonnormalset.discard(f)
return exists
To: mbthomas, #hg-reviewers, durin42
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list