# HG changeset patch # User Boris Feld # Date 1529621623 -3600 # Node ID 879cbdde63df58af8579f018cd9210f7c83c622f # Parent 561a450c7b64fee9912b742218b4162638861465 revlog: do inclusive descendant testing (API) In many other places, a revision is considered a descendant of itself. We update the behavior of `revlog.descendant()` to match this. (for example. `revlog.isancestor` does inclusive testing). No tests break, so it seems safe to do so. This will make it easier to use a more efficient implementation in a later changeset. diff -r 561a450c7b64 -r 879cbdde63df mercurial/revlog.py --- a/mercurial/revlog.py Sat Jun 30 16:06:05 2018 -0700 +++ b/mercurial/revlog.py Thu Jun 21 23:53:43 2018 +0100 @@ -1378,6 +1378,8 @@ def descendant(self, start, end): if start == nullrev: return True + elif start == end: + return True for i in self.descendants([start]): if i == end: return True