[Updated] D11344: dirstate: drop the deprecated `normal` method

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Fri Aug 27 12:39:55 UTC 2021


Closed by commit rHGf89ac1ed2bc6: dirstate: drop the deprecated `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/D11344?vs=30060&id=30102

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D11344/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D11344

AFFECTED FILES
  contrib/dirstatenonnormalcheck.py
  hgext/sparse.py
  mercurial/dirstate.py
  mercurial/interfaces/dirstate.py

CHANGE DETAILS

diff --git a/mercurial/interfaces/dirstate.py b/mercurial/interfaces/dirstate.py
--- a/mercurial/interfaces/dirstate.py
+++ b/mercurial/interfaces/dirstate.py
@@ -132,18 +132,6 @@
     def copies():
         pass
 
-    def normal(f, parentfiledata=None):
-        """Mark a file normal and clean.
-
-        parentfiledata: (mode, size, mtime) of the clean file
-
-        parentfiledata should be computed from memory (for mode,
-        size), as or close as possible from the point where we
-        determined the file was clean, to limit the risk of the
-        file having been changed by an external process between the
-        moment where the file was determined to be clean and now."""
-        pass
-
     def normallookup(f):
         '''Mark a file normal, but possibly dirty.'''
 
diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -705,32 +705,6 @@
         mtime = s[stat.ST_MTIME]
         return (mode, size, mtime)
 
-    def normal(self, f, parentfiledata=None):
-        """Mark a file normal and clean.
-
-        parentfiledata: (mode, size, mtime) of the clean file
-
-        parentfiledata should be computed from memory (for mode,
-        size), as or close as possible from the point where we
-        determined the file was clean, to limit the risk of the
-        file having been changed by an external process between the
-        moment where the file was determined to be clean and now."""
-        if self.pendingparentchange():
-            util.nouideprecwarn(
-                b"do not use `normal` inside of update/merge context."
-                b" Use `update_file` or `update_file_p1`",
-                b'6.0',
-                stacklevel=2,
-            )
-        else:
-            util.nouideprecwarn(
-                b"do not use `normal` outside of update/merge context."
-                b" Use `set_tracked`",
-                b'6.0',
-                stacklevel=2,
-            )
-        self._normal(f, parentfiledata=parentfiledata)
-
     def _normal(self, f, parentfiledata=None):
         if parentfiledata:
             (mode, size, mtime) = parentfiledata
diff --git a/hgext/sparse.py b/hgext/sparse.py
--- a/hgext/sparse.py
+++ b/hgext/sparse.py
@@ -255,7 +255,6 @@
 
     # Prevent adding files that are outside the sparse checkout
     editfuncs = [
-        b'normal',
         b'set_tracked',
         b'set_untracked',
         b'add',
diff --git a/contrib/dirstatenonnormalcheck.py b/contrib/dirstatenonnormalcheck.py
--- a/contrib/dirstatenonnormalcheck.py
+++ b/contrib/dirstatenonnormalcheck.py
@@ -61,7 +61,6 @@
             # make the extension run very slowly on large repos
             extensions.wrapfunction(dirstatecl, 'normallookup', _checkdirstate)
             extensions.wrapfunction(dirstatecl, 'otherparent', _checkdirstate)
-            extensions.wrapfunction(dirstatecl, 'normal', _checkdirstate)
             extensions.wrapfunction(dirstatecl, 'write', _checkdirstate)
             extensions.wrapfunction(dirstatecl, 'add', _checkdirstate)
             extensions.wrapfunction(dirstatecl, 'remove', _checkdirstate)



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/792fcfeb/attachment-0002.html>


More information about the Mercurial-patches mailing list