comparison mercurial/revlog.py @ 23337:3a8a763f4197

revlog: add a method to get missing revs incrementally This will turn out to be useful for discovery.
author Siddharth Agarwal <sid0@fb.com>
date Sun, 16 Nov 2014 00:39:48 -0800
parents 3a7d9c0c57a5
children d8f5b2f50f41
comparison
equal deleted inserted replaced
23336:4178ad511edf 23337:3a8a763f4197
492 if p not in has: 492 if p not in has:
493 visit.append(p) 493 visit.append(p)
494 missing = list(missing) 494 missing = list(missing)
495 missing.sort() 495 missing.sort()
496 return has, [self.node(r) for r in missing] 496 return has, [self.node(r) for r in missing]
497
498 def incrementalmissingrevs(self, common=None):
499 """Return an object that can be used to incrementally compute the
500 revision numbers of the ancestors of arbitrary sets that are not
501 ancestors of common. This is an ancestor.incrementalmissingancestors
502 object.
503
504 'common' is a list of revision numbers. If common is not supplied, uses
505 nullrev.
506 """
507 if common is None:
508 common = [nullrev]
509
510 return ancestor.incrementalmissingancestors(self.parentrevs, common)
497 511
498 def findmissingrevs(self, common=None, heads=None): 512 def findmissingrevs(self, common=None, heads=None):
499 """Return the revision numbers of the ancestors of heads that 513 """Return the revision numbers of the ancestors of heads that
500 are not ancestors of common. 514 are not ancestors of common.
501 515