Mercurial > public > mercurial-scm > hg
comparison mercurial/commands.py @ 27213:ccae1588117f
graphlog: move creation of workingdir-parent nodes to displaygraph()
Future patches will make a node symbol templatable. Because arguments of a
templatekw function are repo and ctx, "showparents" list will have to be
built from a repo object by that function.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 14 Nov 2015 16:45:15 +0900 |
parents | 84de71ec5c61 |
children | 58f473908951 |
comparison
equal
deleted
inserted
replaced
27212:ef9301ce6046 | 27213:ccae1588117f |
---|---|
4694 """ | 4694 """ |
4695 if opts.get('graph'): | 4695 if opts.get('graph'): |
4696 cmdutil.checkunsupportedgraphflags([], opts) | 4696 cmdutil.checkunsupportedgraphflags([], opts) |
4697 def display(other, chlist, displayer): | 4697 def display(other, chlist, displayer): |
4698 revdag = cmdutil.graphrevs(other, chlist, opts) | 4698 revdag = cmdutil.graphrevs(other, chlist, opts) |
4699 showparents = [ctx.node() for ctx in repo[None].parents()] | 4699 cmdutil.displaygraph(ui, repo, revdag, displayer, |
4700 cmdutil.displaygraph(ui, revdag, displayer, showparents, | |
4701 graphmod.asciiedges) | 4700 graphmod.asciiedges) |
4702 | 4701 |
4703 hg._incoming(display, lambda: 1, ui, repo, source, opts, buffered=True) | 4702 hg._incoming(display, lambda: 1, ui, repo, source, opts, buffered=True) |
4704 return 0 | 4703 return 0 |
4705 | 4704 |
5132 cmdutil.outgoinghooks(ui, repo, other, opts, o) | 5131 cmdutil.outgoinghooks(ui, repo, other, opts, o) |
5133 return | 5132 return |
5134 | 5133 |
5135 revdag = cmdutil.graphrevs(repo, o, opts) | 5134 revdag = cmdutil.graphrevs(repo, o, opts) |
5136 displayer = cmdutil.show_changeset(ui, repo, opts, buffered=True) | 5135 displayer = cmdutil.show_changeset(ui, repo, opts, buffered=True) |
5137 showparents = [ctx.node() for ctx in repo[None].parents()] | 5136 cmdutil.displaygraph(ui, repo, revdag, displayer, graphmod.asciiedges) |
5138 cmdutil.displaygraph(ui, revdag, displayer, showparents, | |
5139 graphmod.asciiedges) | |
5140 cmdutil.outgoinghooks(ui, repo, other, opts, o) | 5137 cmdutil.outgoinghooks(ui, repo, other, opts, o) |
5141 return 0 | 5138 return 0 |
5142 | 5139 |
5143 if opts.get('bookmarks'): | 5140 if opts.get('bookmarks'): |
5144 dest = ui.expandpath(dest or 'default-push', dest or 'default') | 5141 dest = ui.expandpath(dest or 'default-push', dest or 'default') |