mirror of
https://github.com/facebook/sapling.git
synced 2024-10-06 23:07:18 +03:00
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.
This commit is contained in:
parent
a9146eb8c4
commit
edf2794bd1
@ -229,7 +229,9 @@ def generate(ui, dag, displayer, showparents, edgefn):
|
||||
char = ctx.node() in showparents and '@' or 'o'
|
||||
displayer.show(ctx)
|
||||
lines = displayer.hunk.pop(rev).split('\n')[:-1]
|
||||
displayer.flush(rev)
|
||||
ascii(ui, state, type, char, lines, edgefn(seen, rev, parents))
|
||||
displayer.close()
|
||||
|
||||
def graphlog(ui, repo, path=None, **opts):
|
||||
"""show revision history alongside an ASCII revision graph
|
||||
|
@ -740,6 +740,17 @@ Issue1896: File log with explicit style
|
||||
date: Thu Jan 01 00:00:00 1970 +0000
|
||||
summary: one
|
||||
|
||||
Issue2395: glog --style header and footer
|
||||
$ hg glog --style=xml one
|
||||
<?xml version="1.0"?>
|
||||
<log>
|
||||
o <logentry revision="0" node="3d578b4a1f537d5fcf7301bfa9c0b97adfaa6fb1">
|
||||
<author email="test">test</author>
|
||||
<date>1970-01-01T00:00:00+00:00</date>
|
||||
<msg xml:space="preserve">one</msg>
|
||||
</logentry>
|
||||
</log>
|
||||
|
||||
$ cd ..
|
||||
|
||||
Incoming and outgoing:
|
||||
|
Loading…
Reference in New Issue
Block a user