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.
--- 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