comparison mercurial/obsolete.py @ 20204:b0c14c5d44b1

obsolete: improve allsuccessors doc string The fact original nodes are also yield is not obvious. We update the docstring to highlight it.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Mon, 23 Dec 2013 13:33:21 -0800
parents 509768fc7542
children cdcbe103b69a
comparison
equal deleted inserted replaced
20203:509768fc7542 20204:b0c14c5d44b1
438 def allsuccessors(obsstore, nodes, ignoreflags=0): 438 def allsuccessors(obsstore, nodes, ignoreflags=0):
439 """Yield node for every successor of <nodes>. 439 """Yield node for every successor of <nodes>.
440 440
441 Some successors may be unknown locally. 441 Some successors may be unknown locally.
442 442
443 This is a linear yield unsuited to detecting split changesets.""" 443 This is a linear yield unsuited to detecting split changesets. It includes
444 initial nodes too."""
444 remaining = set(nodes) 445 remaining = set(nodes)
445 seen = set(remaining) 446 seen = set(remaining)
446 while remaining: 447 while remaining:
447 current = remaining.pop() 448 current = remaining.pop()
448 yield current 449 yield current