mercurial/context.py
changeset 38709 6a032a8f741b
parent 38670 fbec9c0b32d3
child 38751 71d6886d27cf
--- a/mercurial/context.py	Sun Jul 15 18:32:17 2018 +0900
+++ b/mercurial/context.py	Mon Jul 16 16:21:12 2018 +0200
@@ -589,6 +589,12 @@
                             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, '
+               '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)