# HG changeset patch # User Mads Kiilerich # Date 1285635480 -7200 # 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 -r fdb0983ad395 -r aa1faedeac5a hgext/graphlog.py --- a/hgext/graphlog.py Tue Sep 28 02:57:59 2010 +0200 +++ b/hgext/graphlog.py Tue Sep 28 02:58:00 2010 +0200 @@ -229,7 +229,9 @@ 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 -r fdb0983ad395 -r aa1faedeac5a tests/test-glog.t --- a/tests/test-glog.t Tue Sep 28 02:57:59 2010 +0200 +++ b/tests/test-glog.t Tue Sep 28 02:58:00 2010 +0200 @@ -740,6 +740,17 @@ 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: