mercurial/dirstate.py
changeset 47701 0e87c90f1cd5
parent 47696 ff481c238496
child 47704 8a50fb0784a9
--- 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`",