dirstate: deprecated `remove` outside of `update/merge`
All core users have been migrated.
Differential Revision: https://phab.mercurial-scm.org/D11115
--- a/mercurial/dirstate.py Thu Jul 08 00:35:06 2021 +0200
+++ b/mercurial/dirstate.py Thu Jul 08 03:30:11 2021 +0200
@@ -724,6 +724,13 @@
def remove(self, f):
'''Mark a file removed'''
+ if not self.pendingparentchange():
+ util.nouideprecwarn(
+ b"do not use `remove` outside of update/merge context."
+ b" Use `set_untracked`",
+ b'6.0',
+ stacklevel=2,
+ )
self._remove(f)
def _remove(self, filename):