ancestor: add a way to test whether a missing ancestor object has bases
This is pretty trivial so there's no unit test coverage for it.
This will be used by setdiscovery.
--- a/mercurial/ancestor.py Fri Nov 14 16:53:40 2014 -0800
+++ b/mercurial/ancestor.py Sun Nov 16 00:39:29 2014 -0800
@@ -146,6 +146,10 @@
self.bases.add(nullrev)
self.pfunc = pfunc
+ def hasbases(self):
+ '''whether the common set has any non-trivial bases'''
+ return self.bases and self.bases != set([nullrev])
+
def missingancestors(self, revs):
'''return all the ancestors of revs that are not ancestors of self.bases