comparison hgext/graphlog.py @ 9176:d12e9b40e444

graphlog: fix incoming with local repo (issue1731)
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Sun, 19 Jul 2009 18:59:19 +0200
parents 9dda4c73fc3b
children efe990445b33
comparison
equal deleted inserted replaced
9175:22979282d8ca 9176:d12e9b40e444
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)
339 # use the created uncompressed bundlerepo 341 # use the created uncompressed bundlerepo
340 other = bundlerepo.bundlerepository(ui, repo.root, fname) 342 other = bundlerepo.bundlerepository(ui, repo.root, fname)
341 343
342 chlist = other.changelog.nodesbetween(incoming, revs)[0] 344 chlist = other.changelog.nodesbetween(incoming, revs)[0]
343 revdag = graphrevs(other, chlist, opts) 345 revdag = graphrevs(other, chlist, opts)
344 fmtdag = asciiformat(ui, repo, revdag, opts) 346 fmtdag = asciiformat(ui, other, revdag, opts, parentrepo=repo)
345 ascii(ui, asciiedges(fmtdag)) 347 ascii(ui, asciiedges(fmtdag))
346 348
347 finally: 349 finally:
348 if hasattr(other, 'close'): 350 if hasattr(other, 'close'):
349 other.close() 351 other.close()