dirstate: deprecated `drop` outside of `update/merge`
All core users have been migrated.
Differential Revision: https://phab.mercurial-scm.org/D11116
--- 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):