comparison mercurial/revlog.py @ 3683:b0fd43effdb3

add docstring to reachable
author Matt Mackall <mpm@selenic.com>
date Sun, 19 Nov 2006 16:32:36 -0600
parents 69cf255a55a1
children 3a099154b110
comparison
equal deleted inserted replaced
3682:20912eb2667d 3683:b0fd43effdb3
541 return nullrev 541 return nullrev
542 else: 542 else:
543 return self.index[rev][-5] 543 return self.index[rev][-5]
544 544
545 def reachable(self, node, stop=None): 545 def reachable(self, node, stop=None):
546 """return a hash of all nodes ancestral to a given node, including
547 the node itself, stopping when stop is matched"""
546 reachable = {} 548 reachable = {}
547 visit = [node] 549 visit = [node]
548 reachable[node] = 1 550 reachable[node] = 1
549 if stop: 551 if stop:
550 stopn = self.rev(stop) 552 stopn = self.rev(stop)