comparison mercurial/localrepo.py @ 9093:0b2b269ba3d0

branch heads: fix regression introduced in e67e5b60e55f (issue1726) For merge nodes it is not adequate to only check a single possible branch head for whether it is an ancestor of the latest head, but it needs to be done for each possible branch head.
author Henrik Stuart <hg@hstuart.dk>
date Thu, 09 Jul 2009 20:49:02 +0200
parents 7b19cda0fa10
children bbc78cb1bf15 d3b995dd4eab
comparison
equal deleted inserted replaced
9089:8ec39725d966 9093:0b2b269ba3d0
471 # starting from tip means fewer passes over reachable 471 # starting from tip means fewer passes over reachable
472 while newnodes: 472 while newnodes:
473 latest = newnodes.pop() 473 latest = newnodes.pop()
474 if latest not in bheads: 474 if latest not in bheads:
475 continue 475 continue
476 reachable = self.changelog.reachable(latest, bheads[0]) 476 reachable = set()
477 for bh in bheads:
478 reachable |= self.changelog.reachable(latest, bh)
477 bheads = [b for b in bheads if b not in reachable] 479 bheads = [b for b in bheads if b not in reachable]
478 newbheads.insert(0, latest) 480 newbheads.insert(0, latest)
479 bheads.extend(newbheads) 481 bheads.extend(newbheads)
480 partial[branch] = bheads 482 partial[branch] = bheads
481 483