[Updated] D11346: dirstate: drop the deprecated `otherparent` method
marmoute (Pierre-Yves David)
phabricator at mercurial-scm.org
Fri Aug 27 12:40:01 UTC 2021
Closed by commit rHG3d2c17c5d7f2: dirstate: drop the deprecated `otherparent` 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/D11346?vs=30062&id=30104
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D11346/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D11346
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 otherparent(f):
- '''Mark as coming from the other parent, always dirty.'''
-
def add(f):
'''Mark a file added.'''
diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py
--- a/mercurial/dirstate.py
+++ b/mercurial/dirstate.py
@@ -744,24 +744,6 @@
self._addpath(f, possibly_dirty=True)
self._map.copymap.pop(f, None)
- def otherparent(self, f):
- '''Mark as coming from the other parent, always dirty.'''
- if self.pendingparentchange():
- util.nouideprecwarn(
- b"do not use `otherparent` inside of update/merge context."
- b" Use `update_file` or `update_file_p1`",
- b'6.0',
- stacklevel=2,
- )
- else:
- util.nouideprecwarn(
- b"do not use `otherparent` outside of update/merge context."
- b"It should have been set by the update/merge code",
- b'6.0',
- stacklevel=2,
- )
- self._otherparent(f)
-
def _otherparent(self, f):
if not self.in_merge:
msg = _(b"setting %r to other parent only allowed in merges") % f
diff --git a/contrib/dirstatenonnormalcheck.py b/contrib/dirstatenonnormalcheck.py
--- a/contrib/dirstatenonnormalcheck.py
+++ b/contrib/dirstatenonnormalcheck.py
@@ -59,7 +59,6 @@
if paranoid:
# 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, 'otherparent', _checkdirstate)
extensions.wrapfunction(dirstatecl, 'write', _checkdirstate)
extensions.wrapfunction(dirstatecl, 'add', _checkdirstate)
extensions.wrapfunction(dirstatecl, 'remove', _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/65254fc0/attachment-0002.html>
More information about the Mercurial-patches
mailing list