Mercurial > hg
comparison hgext/graphlog.py @ 9180:efe990445b33
merge with -stable
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Sun, 19 Jul 2009 21:15:40 +0200 |
parents | 864b719ff1ad d12e9b40e444 |
children | 061eeb602354 |
comparison
equal
deleted
inserted
replaced
9179:9e5e2e07cf81 | 9180:efe990445b33 |
---|---|
20 from mercurial import bundlerepo, changegroup, cmdutil, commands, extensions | 20 from mercurial import bundlerepo, changegroup, cmdutil, commands, extensions |
21 from mercurial import hg, url, util, graphmod | 21 from mercurial import hg, url, util, graphmod |
22 | 22 |
23 ASCIIDATA = 'ASC' | 23 ASCIIDATA = 'ASC' |
24 | 24 |
25 def asciiformat(ui, repo, revdag, opts): | 25 def asciiformat(ui, repo, revdag, opts, parentrepo=None): |
26 """formats a changelog DAG walk for ASCII output""" | 26 """formats a changelog DAG walk for ASCII output""" |
27 showparents = [ctx.node() for ctx in repo[None].parents()] | 27 if parentrepo is None: |
28 parentrepo = repo | |
29 showparents = [ctx.node() for ctx in parentrepo[None].parents()] | |
28 displayer = show_changeset(ui, repo, opts, buffered=True) | 30 displayer = show_changeset(ui, repo, opts, buffered=True) |
29 for (id, type, ctx, parentids) in revdag: | 31 for (id, type, ctx, parentids) in revdag: |
30 if type != graphmod.CHANGESET: | 32 if type != graphmod.CHANGESET: |
31 continue | 33 continue |
32 displayer.show(ctx) | 34 displayer.show(ctx) |
337 # use the created uncompressed bundlerepo | 339 # use the created uncompressed bundlerepo |
338 other = bundlerepo.bundlerepository(ui, repo.root, fname) | 340 other = bundlerepo.bundlerepository(ui, repo.root, fname) |
339 | 341 |
340 chlist = other.changelog.nodesbetween(incoming, revs)[0] | 342 chlist = other.changelog.nodesbetween(incoming, revs)[0] |
341 revdag = graphrevs(other, chlist, opts) | 343 revdag = graphrevs(other, chlist, opts) |
342 fmtdag = asciiformat(ui, repo, revdag, opts) | 344 fmtdag = asciiformat(ui, other, revdag, opts, parentrepo=repo) |
343 ascii(ui, asciiedges(fmtdag)) | 345 ascii(ui, asciiedges(fmtdag)) |
344 | 346 |
345 finally: | 347 finally: |
346 if hasattr(other, 'close'): | 348 if hasattr(other, 'close'): |
347 other.close() | 349 other.close() |