Mercurial > public > mercurial-scm > hg
comparison hgext/graphlog.py @ 12579:aa1faedeac5a
graphlog: style with header and footer (issue2395)
The glog command didn't emit header and footer from the style, as demonstrated
by "hg glog --style xml". Asciiart combined with xml markup hardly makes sense,
but header and footer might however be useful for adding for example html pre
tags around the graph.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Tue, 28 Sep 2010 02:58:00 +0200 |
parents | 13921a1af02b |
children | 33e1fd2aeb3c |
comparison
equal
deleted
inserted
replaced
12578:fdb0983ad395 | 12579:aa1faedeac5a |
---|---|
227 seen, state = [], asciistate() | 227 seen, state = [], asciistate() |
228 for rev, type, ctx, parents in dag: | 228 for rev, type, ctx, parents in dag: |
229 char = ctx.node() in showparents and '@' or 'o' | 229 char = ctx.node() in showparents and '@' or 'o' |
230 displayer.show(ctx) | 230 displayer.show(ctx) |
231 lines = displayer.hunk.pop(rev).split('\n')[:-1] | 231 lines = displayer.hunk.pop(rev).split('\n')[:-1] |
232 displayer.flush(rev) | |
232 ascii(ui, state, type, char, lines, edgefn(seen, rev, parents)) | 233 ascii(ui, state, type, char, lines, edgefn(seen, rev, parents)) |
234 displayer.close() | |
233 | 235 |
234 def graphlog(ui, repo, path=None, **opts): | 236 def graphlog(ui, repo, path=None, **opts): |
235 """show revision history alongside an ASCII revision graph | 237 """show revision history alongside an ASCII revision graph |
236 | 238 |
237 Print a revision history alongside a revision graph drawn with | 239 Print a revision history alongside a revision graph drawn with |