# HG changeset patch # User Pierre-Yves David # Date 2021-07-19 07:05:25 # Node ID aca197f5ef7d28df504a89550c85abf8a933a096 # Parent 5bcd305389c77351797f5527048364aed315e507 dirstate: deprecate the `drop` method All users have been migrated. Differential Revision: https://phab.mercurial-scm.org/D11195 diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py --- a/mercurial/dirstate.py +++ b/mercurial/dirstate.py @@ -882,7 +882,14 @@ class dirstate(object): def drop(self, f): '''Drop a file from the dirstate''' - if not self.pendingparentchange(): + if self.pendingparentchange(): + util.nouideprecwarn( + b"do not use `drop` inside of update/merge context." + b" Use `update_file`", + b'6.0', + stacklevel=2, + ) + else: util.nouideprecwarn( b"do not use `drop` outside of update/merge context." b" Use `set_untracked`",