[Updated] D11350: dirstate: drop the deprecated `drop` method
marmoute (Pierre-Yves David)
phabricator at mercurial-scm.org
Fri Aug 27 12:40:37 UTC 2021
Closed by commit rHG51cd60c0a345: dirstate: drop the deprecated `drop` method (authored by marmoute).
This revision was automatically updated to reflect the committed changes.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D11350?vs=30066&id=30108
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D11350/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D11350
AFFECTED FILES
contrib/dirstatenonnormalcheck.py
mercurial/dirstate.py
mercurial/interfaces/dirstate.py
CHANGE DETAILS
diff --git a/mercurial/interfaces/dirstate.py b/mercurial/interfaces/dirstate.py
--- a/mercurial/interfaces/dirstate.py
+++ b/mercurial/interfaces/dirstate.py
@@ -132,9 +132,6 @@
def copies():
pass
- def drop(f):
- '''Drop a file from the dirstate'''
-
def normalize(path, isknown=False, ignoremissing=False):
"""
normalize the case of a pathname when on a casefolding filesystem
diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -767,24 +767,6 @@
return self._normallookup(f)
return self._otherparent(f)
- def drop(self, f):
- '''Drop a file from the dirstate'''
- 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`",
- b'6.0',
- stacklevel=2,
- )
- self._drop(f)
-
def _drop(self, filename):
"""internal function to drop a file from the dirstate"""
if self._map.dropfile(filename):
diff --git a/contrib/dirstatenonnormalcheck.py b/contrib/dirstatenonnormalcheck.py
--- a/contrib/dirstatenonnormalcheck.py
+++ b/contrib/dirstatenonnormalcheck.py
@@ -60,7 +60,6 @@
# We don't do all these checks when paranoid is disable as it would
# make the extension run very slowly on large repos
extensions.wrapfunction(dirstatecl, 'write', _checkdirstate)
- extensions.wrapfunction(dirstatecl, 'drop', _checkdirstate)
extensions.wrapfunction(dirstatecl, 'set_tracked', _checkdirstate)
extensions.wrapfunction(dirstatecl, 'set_untracked', _checkdirstate)
extensions.wrapfunction(
To: marmoute, #hg-reviewers, Alphare
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210827/20c2333c/attachment-0002.html>
More information about the Mercurial-patches
mailing list