changeset 38710:4ac3c2078567

revlog: reintroduce `revlog.descendant` as deprecated Reintroduce `revlog.descendant` to help extensions authors update their extensions in order to use the new API.
author Boris Feld <boris.feld@octobus.net>
date Mon, 16 Jul 2018 16:22:43 +0200
parents 6a032a8f741b
children 240ebbd328e0
files mercurial/revlog.py
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revlog.py	Mon Jul 16 16:21:12 2018 +0200
+++ b/mercurial/revlog.py	Mon Jul 16 16:22:43 2018 +0200
@@ -1666,6 +1666,11 @@
         a, b = self.rev(a), self.rev(b)
         return self.isancestorrev(a, b)
 
+    def descendant(self, a, b):
+        msg = (b'revlog.descendant is deprecated, use revlog.isancestorrev')
+        self._repo.ui.deprecwarn(msg, b'4.7')
+        return self.isancestorrev(a, b)
+
     def isancestorrev(self, a, b):
         """return True if revision a is an ancestor of revision b