dirstate: deprecate `dirstate.remove` in all cases
This will make sure that code will use the newer, more semantic API sooner than
later.
Differential Revision: https://phab.mercurial-scm.org/D11143
--- a/mercurial/dirstate.py Mon Jul 19 03:20:28 2021 +0200
+++ b/mercurial/dirstate.py Fri Jul 16 14:06:32 2021 +0200
@@ -765,7 +765,14 @@
def remove(self, f):
'''Mark a file removed'''
- if not self.pendingparentchange():
+ if self.pendingparentchange():
+ util.nouideprecwarn(
+ b"do not use `remove` insde of update/merge context."
+ b" Use `update_file` or `update_file_p1`",
+ b'6.0',
+ stacklevel=2,
+ )
+ else:
util.nouideprecwarn(
b"do not use `remove` outside of update/merge context."
b" Use `set_untracked`",