mercurial/dirstate.py
changeset 47663 6f8d6dd32e61
parent 47662 1a79bb8c572c
child 47670 ec1d63e64448
--- a/mercurial/dirstate.py	Thu Jul 08 03:30:11 2021 +0200
+++ b/mercurial/dirstate.py	Thu Jul 08 10:28:20 2021 +0200
@@ -747,6 +747,13 @@
 
     def drop(self, f):
         '''Drop a file from the dirstate'''
+        if not self.pendingparentchange():
+            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):