changeset 47753:aca197f5ef7d

dirstate: deprecate the `drop` method All users have been migrated. Differential Revision: https://phab.mercurial-scm.org/D11195
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 19 Jul 2021 09:05:25 +0200
parents 5bcd305389c7
children 4d845260a713
files mercurial/dirstate.py
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/dirstate.py	Mon Jul 19 17:33:45 2021 +0200
+++ b/mercurial/dirstate.py	Mon Jul 19 09:05:25 2021 +0200
@@ -882,7 +882,14 @@
 
     def drop(self, f):
         '''Drop a file from the dirstate'''
-        if not self.pendingparentchange():
+        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`",