changeset 7371:6ad2b914acbd

graphlog: use built-in log output buffering
author Dirkjan Ochtman <dirkjan@ochtman.nl>
date Fri, 14 Nov 2008 13:48:23 +0100
parents 7bc62ebe7693
children e17dbf140035
files hgext/graphlog.py
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/graphlog.py	Fri Nov 14 13:44:10 2008 +0100
+++ b/hgext/graphlog.py	Fri Nov 14 13:48:23 2008 +0100
@@ -281,16 +281,15 @@
         revdag = revisions(repo, start, stop)
 
     repo_parents = repo.dirstate.parents()
-    displayer = show_changeset(ui, repo, opts)
+    displayer = show_changeset(ui, repo, opts, buffered=True)
     def graphabledag():
         for (ctx, parents) in revdag:
             # log_strings is the list of all log strings to draw alongside
             # the graph.
-            ui.pushbuffer()
             displayer.show(ctx)
-            log_strings = ui.popbuffer().split("\n")[:-1]
+            lines = displayer.hunk.pop(ctx.rev()).split("\n")[:-1]
             char = ctx.node() in repo_parents and '@' or 'o'
-            yield (ctx.rev(), parents, char, log_strings)
+            yield (ctx.rev(), parents, char, lines)
 
     ascii(ui, grapher(graphabledag()))