[Updated] D11352: dirstate: drop the `_normal` method
marmoute (Pierre-Yves David)
phabricator at mercurial-scm.org
Fri Aug 27 12:40:59 UTC 2021
Closed by commit rHG1b3c753b62c6: dirstate: drop the `_normal` method (authored by marmoute).
This revision was automatically updated to reflect the committed changes.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D11352?vs=30068&id=30110
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D11352/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D11352
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
@@ -510,7 +510,19 @@
"""record that the current state of the file on disk is known to be clean"""
self._dirty = True
self._updatedfiles.add(filename)
- self._normal(filename, parentfiledata=parentfiledata)
+ if parentfiledata:
+ (mode, size, mtime) = parentfiledata
+ else:
+ (mode, size, mtime) = self._get_filedata(filename)
+ self._addpath(filename, mode=mode, size=size, mtime=mtime)
+ self._map.copymap.pop(filename, None)
+ if filename in self._map.nonnormalset:
+ self._map.nonnormalset.remove(filename)
+ if mtime > self._lastnormaltime:
+ # Remember the most recent modification timeslot for status(),
+ # to make sure we won't miss future size-preserving file content
+ # modifications that happen within the same timeslot.
+ self._lastnormaltime = mtime
@requires_no_parents_change
def set_possibly_dirty(self, filename):
@@ -705,21 +717,6 @@
mtime = s[stat.ST_MTIME]
return (mode, size, mtime)
- def _normal(self, f, parentfiledata=None):
- if parentfiledata:
- (mode, size, mtime) = parentfiledata
- else:
- (mode, size, mtime) = self._get_filedata(f)
- self._addpath(f, mode=mode, size=size, mtime=mtime)
- self._map.copymap.pop(f, None)
- if f in self._map.nonnormalset:
- self._map.nonnormalset.remove(f)
- if mtime > self._lastnormaltime:
- # Remember the most recent modification timeslot for status(),
- # to make sure we won't miss future size-preserving file content
- # modifications that happen within the same timeslot.
- self._lastnormaltime = mtime
-
def _normallookup(self, f):
'''Mark a file normal, but possibly dirty.'''
if self.in_merge:
To: marmoute, #hg-reviewers, Alphare
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210827/4673ed05/attachment-0002.html>
More information about the Mercurial-patches
mailing list