# HG changeset patch # User Siddharth Agarwal # Date 1416127169 28800 # Node ID 83225aff0265e76647d1e627d1723e0afb0befdf # Parent 5c3a29be8faecd9402efa849ff234af7c854007c 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. diff -r 5c3a29be8fae -r 83225aff0265 mercurial/ancestor.py --- 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