Mercurial > public > mercurial-scm > hg-stable
diff mercurial/dirstatemap.py @ 47539:84391ddf4c78
dirstate-item: rename the class to DirstateItem
The object is no longer a tuple, so it seems clearer to rename it (and its
associated method)
Differential Revision: https://phab.mercurial-scm.org/D10982
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sun, 04 Jul 2021 22:27:29 +0200 |
parents | 6025353c9c55 |
children | b8013cb71ef3 |
line wrap: on
line diff
--- a/mercurial/dirstatemap.py Sun Jul 04 02:37:38 2021 +0200 +++ b/mercurial/dirstatemap.py Sun Jul 04 22:27:29 2021 +0200 @@ -23,7 +23,7 @@ propertycache = util.propertycache -dirstatetuple = parsers.dirstatetuple +DirstateItem = parsers.DirstateItem # a special value used internally for `size` if the file come from the other parent @@ -194,7 +194,7 @@ self._dirs.addpath(f) if old_entry is None and "_alldirs" in self.__dict__: self._alldirs.addpath(f) - self._map[f] = dirstatetuple(state, mode, size, mtime) + self._map[f] = DirstateItem(state, mode, size, mtime) if state != b'n' or mtime == AMBIGUOUS_TIME: self.nonnormalset.add(f) if size == FROM_P2: @@ -232,7 +232,7 @@ if "filefoldmap" in self.__dict__: normed = util.normcase(f) self.filefoldmap.pop(normed, None) - self._map[f] = dirstatetuple(b'r', 0, size, 0) + self._map[f] = DirstateItem(b'r', 0, size, 0) self.nonnormalset.add(f) def dropfile(self, f): @@ -261,7 +261,7 @@ for f in files: e = self.get(f) if e is not None and e[0] == b'n' and e[3] == now: - self._map[f] = dirstatetuple(e[0], e[1], e[2], AMBIGUOUS_TIME) + self._map[f] = DirstateItem(e[0], e[1], e[2], AMBIGUOUS_TIME) self.nonnormalset.add(f) def nonnormalentries(self):