[Updated] D11347: dirstate: drop the deprecated `add` method
marmoute (Pierre-Yves David)
phabricator at mercurial-scm.org
Fri Aug 27 12:40:18 UTC 2021
Closed by commit rHG91afee6f959e: dirstate: drop the deprecated `add` 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/D11347?vs=30063&id=30105
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D11347/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D11347
AFFECTED FILES
contrib/dirstatenonnormalcheck.py
hgext/sparse.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 add(f):
- '''Mark a file added.'''
-
def remove(f):
'''Mark a file removed.'''
diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -757,24 +757,6 @@
self._addpath(f, from_p2=True)
self._map.copymap.pop(f, None)
- def add(self, f):
- '''Mark a file added.'''
- if self.pendingparentchange():
- util.nouideprecwarn(
- b"do not use `add` inside of update/merge context."
- b" Use `update_file`",
- b'6.0',
- stacklevel=2,
- )
- else:
- util.nouideprecwarn(
- b"do not use `add` outside of update/merge context."
- b" Use `set_tracked`",
- b'6.0',
- stacklevel=2,
- )
- self._add(f)
-
def _add(self, filename):
"""internal function to mark a file as added"""
self._addpath(filename, added=True)
diff --git a/hgext/sparse.py b/hgext/sparse.py
--- a/hgext/sparse.py
+++ b/hgext/sparse.py
@@ -257,7 +257,6 @@
editfuncs = [
b'set_tracked',
b'set_untracked',
- b'add',
b'copy',
b'remove',
b'merge',
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, 'add', _checkdirstate)
extensions.wrapfunction(dirstatecl, 'remove', _checkdirstate)
extensions.wrapfunction(dirstatecl, 'merge', _checkdirstate)
extensions.wrapfunction(dirstatecl, 'drop', _checkdirstate)
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/5ea8b95e/attachment-0002.html>
More information about the Mercurial-patches
mailing list