changeset 47915:51cd60c0a345

dirstate: drop the deprecated `drop` method eh ;-) Differential Revision: https://phab.mercurial-scm.org/D11350
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 24 Aug 2021 21:12:39 +0200
parents 8e46934c58d2
children 65e3d8028f2e
files contrib/dirstatenonnormalcheck.py mercurial/dirstate.py mercurial/interfaces/dirstate.py
diffstat 3 files changed, 0 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/dirstatenonnormalcheck.py	Tue Aug 24 21:11:57 2021 +0200
+++ b/contrib/dirstatenonnormalcheck.py	Tue Aug 24 21:12:39 2021 +0200
@@ -60,7 +60,6 @@
             # We don't do all these checks when paranoid is disable as it would
             # make the extension run very slowly on large repos
             extensions.wrapfunction(dirstatecl, 'write', _checkdirstate)
-            extensions.wrapfunction(dirstatecl, 'drop', _checkdirstate)
             extensions.wrapfunction(dirstatecl, 'set_tracked', _checkdirstate)
             extensions.wrapfunction(dirstatecl, 'set_untracked', _checkdirstate)
             extensions.wrapfunction(
--- a/mercurial/dirstate.py	Tue Aug 24 21:11:57 2021 +0200
+++ b/mercurial/dirstate.py	Tue Aug 24 21:12:39 2021 +0200
@@ -767,24 +767,6 @@
             return self._normallookup(f)
         return self._otherparent(f)
 
-    def drop(self, f):
-        '''Drop a file from the dirstate'''
-        if self.pendingparentchange():
-            util.nouideprecwarn(
-                b"do not use `drop` inside of update/merge context."
-                b" Use `update_file`",
-                b'6.0',
-                stacklevel=2,
-            )
-        else:
-            util.nouideprecwarn(
-                b"do not use `drop` outside of update/merge context."
-                b" Use `set_untracked`",
-                b'6.0',
-                stacklevel=2,
-            )
-        self._drop(f)
-
     def _drop(self, filename):
         """internal function to drop a file from the dirstate"""
         if self._map.dropfile(filename):
--- a/mercurial/interfaces/dirstate.py	Tue Aug 24 21:11:57 2021 +0200
+++ b/mercurial/interfaces/dirstate.py	Tue Aug 24 21:12:39 2021 +0200
@@ -132,9 +132,6 @@
     def copies():
         pass
 
-    def drop(f):
-        '''Drop a file from the dirstate'''
-
     def normalize(path, isknown=False, ignoremissing=False):
         """
         normalize the case of a pathname when on a casefolding filesystem