# HG changeset patch # User Mads Kiilerich # Date 2010-09-28 00:58:00 # Node ID aa1faedeac5af0075362e11fcabf0bca125553e8 # Parent fdb0983ad3955438cabb1f41cfc9c2b025df65ed 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. diff --git a/hgext/graphlog.py b/hgext/graphlog.py --- a/hgext/graphlog.py +++ b/hgext/graphlog.py @@ -229,7 +229,9 @@ def generate(ui, dag, displayer, showpar 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 diff --git a/tests/test-glog.t b/tests/test-glog.t --- a/tests/test-glog.t +++ b/tests/test-glog.t @@ -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 + + + o + test + 1970-01-01T00:00:00+00:00 + one + + + $ cd .. Incoming and outgoing: