comparison mercurial/localrepo.py @ 17009:0c18aed2fcca

revlog: remove reachable and switch call sites to ancestors This change does a trivial conversion of callsites to ancestors. Followon diffs will switch the callsites over to revs.
author Joshua Redstone <joshua.redstone@fb.com>
date Fri, 08 Jun 2012 08:39:44 -0700
parents a1eb17bed550
children ea97744c4801
comparison
equal deleted inserted replaced
17008:553e8f5aba7a 17009:0c18aed2fcca
588 while newnodes: 588 while newnodes:
589 latest = newnodes.pop() 589 latest = newnodes.pop()
590 if latest not in bheads: 590 if latest not in bheads:
591 continue 591 continue
592 minbhnode = self[bheads[0]].node() 592 minbhnode = self[bheads[0]].node()
593 reachable = self.changelog.reachable(latest, minbhnode) 593 cl = self.changelog
594 reachable.remove(latest) 594 ancestors = cl.ancestors([cl.rev(latest)],
595 cl.rev(minbhnode))
596 reachable = [cl.node(rev) for rev in ancestors]
595 if reachable: 597 if reachable:
596 bheads = [b for b in bheads if b not in reachable] 598 bheads = [b for b in bheads if b not in reachable]
597 partial[branch] = bheads 599 partial[branch] = bheads
598 600
599 def lookup(self, key): 601 def lookup(self, key):