comparison mercurial/graphmod.py @ 8837:d8e3a98018cb

graphmod/graphlog: extract nodelistwalk
author Peter Arrenbrecht <peter.arrenbrecht@gmail.com>
date Fri, 19 Jun 2009 13:14:45 +0200
parents 11ff34956ee7
children d9acbe7b0049
comparison
equal deleted inserted replaced
8836:11ff34956ee7 8837:d8e3a98018cb
39 if fctx.rev() <= start: 39 if fctx.rev() <= start:
40 yield (fctx, parents) 40 yield (fctx, parents)
41 if fctx.rev() <= stop: 41 if fctx.rev() <= stop:
42 break 42 break
43 filerev -= 1 43 filerev -= 1
44
45 def nodes(repo, nodes):
46 include = set(nodes)
47 for node in nodes:
48 ctx = repo[node]
49 parents = [p.rev() for p in ctx.parents() if p.node() in include]
50 parents.sort()
51 yield (ctx, parents)
44 52
45 def graph(repo, start_rev, stop_rev): 53 def graph(repo, start_rev, stop_rev):
46 """incremental revision grapher 54 """incremental revision grapher
47 55
48 This generator function walks through the revision history from 56 This generator function walks through the revision history from