[PATCH 11 of 16] revlog: switch findmissing* methods to incrementalmissingrevs
Siddharth Agarwal
sid0 at fb.com
Sun Nov 16 03:17:13 CST 2014
# HG changeset patch
# User Siddharth Agarwal <sid0 at fb.com>
# Date 1416012760 28800
# Fri Nov 14 16:52:40 2014 -0800
# Node ID 96be9921a682a538e358070b78e5ae0f71d1cc44
# Parent 3b089459e1e94936b0d6883c1b8a804ae57bc810
revlog: switch findmissing* methods to incrementalmissingrevs
This will allow us to remove ancestor.missingancestors in an upcoming patch.
diff --git a/mercurial/revlog.py b/mercurial/revlog.py
--- a/mercurial/revlog.py
+++ b/mercurial/revlog.py
@@ -530,7 +530,8 @@
if heads is None:
heads = self.headrevs()
- return ancestor.missingancestors(heads, common, self.parentrevs)
+ inc = self.incrementalmissingrevs(common=common)
+ return inc.missingancestors(heads)
def findmissing(self, common=None, heads=None):
"""Return the ancestors of heads that are not ancestors of common.
@@ -555,8 +556,8 @@
common = [self.rev(n) for n in common]
heads = [self.rev(n) for n in heads]
- return [self.node(r) for r in
- ancestor.missingancestors(heads, common, self.parentrevs)]
+ inc = self.incrementalmissingrevs(common=common)
+ return [self.node(r) for r in inc.missingancestors(heads)]
def nodesbetween(self, roots=None, heads=None):
"""Return a topological path from 'roots' to 'heads'.
More information about the Mercurial-devel
mailing list