[Updated] D11789: dirstate: make it mandatory to provide parentfiledata in `set_clean`
marmoute (Pierre-Yves David)
phabricator at mercurial-scm.org
Wed Dec 1 15:22:39 UTC 2021
Closed by commit rHG080151f18f3a: dirstate: make it mandatory to provide parentfiledata in `set_clean` (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/D11789?vs=31111&id=31251
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D11789/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D11789
AFFECTED FILES
hgext/git/dirstate.py
mercurial/dirstate.py
CHANGE DETAILS
diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -486,15 +486,12 @@
return ret
@requires_no_parents_change
- def set_clean(self, filename, parentfiledata=None):
+ def set_clean(self, filename, parentfiledata):
"""record that the current state of the file on disk is known to be clean"""
self._dirty = True
- if parentfiledata:
- (mode, size, mtime) = parentfiledata
- else:
- (mode, size, mtime) = self._get_filedata(filename)
if not self._map[filename].tracked:
self._check_new_tracked_filename(filename)
+ (mode, size, mtime) = parentfiledata
self._map.set_clean(filename, mode, size, mtime)
if mtime > self._lastnormaltime:
# Remember the most recent modification timeslot for status(),
diff --git a/hgext/git/dirstate.py b/hgext/git/dirstate.py
--- a/hgext/git/dirstate.py
+++ b/hgext/git/dirstate.py
@@ -257,7 +257,7 @@
if match(p):
yield p
- def set_clean(self, f, parentfiledata=None):
+ def set_clean(self, f, parentfiledata):
"""Mark a file normal and clean."""
# TODO: for now we just let libgit2 re-stat the file. We can
# clearly do better.
To: marmoute, durin42, #hg-reviewers, Alphare
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercurial-scm.org/pipermail/mercurial-patches/attachments/20211201/99643f13/attachment-0001.html>
More information about the Mercurial-patches
mailing list