[PATCH 1 of 2] compat: drop compatibility for `context.descendant`

Boris Feld boris.feld at octobus.net
Tue Aug 14 13:35:12 UTC 2018


# HG changeset patch
# User Boris Feld <boris.feld at octobus.net>
# Date 1534234106 -7200
#      Tue Aug 14 10:08:26 2018 +0200
# Node ID 27efa73dcb8082e41923a3b834d92f505daa509d
# Parent  d99468d2b09acc8f5c6c5ce5c1b08b47a742841f
# EXP-Topic compat-drop
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 27efa73dcb80
compat: drop compatibility for `context.descendant`

As advertised, the method is dropped in 4.8.

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -593,12 +593,6 @@ class changectx(basectx):
                             short(n) for n in sorted(cahs) if n != anc))
         return changectx(self._repo, anc)
 
-    def descendant(self, other):
-        msg = (b'ctx.descendant(other) is deprecated, '
-               b'use ctx.isancestorof(other)')
-        self._repo.ui.deprecwarn(msg, b'4.7')
-        return self.isancestorof(other)
-
     def isancestorof(self, other):
         """True if this changeset is an ancestor of other"""
         return self._repo.changelog.isancestorrev(self._rev, other._rev)


More information about the Mercurial-devel mailing list