changeset 4596:8e37342cb05d

patchbomb: flush ui before delegating to pager.
author Patrick Mezard <pmezard@gmail.com>
date Sun, 17 Jun 2007 19:40:02 +0200
parents f7f2bd7f981d
children ec431334e4fc bcfb3a30a112
files hgext/patchbomb.py tests/test-patchbomb.out
diffstat 2 files changed, 15 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/patchbomb.py	Sun Jun 17 19:39:47 2007 +0200
+++ b/hgext/patchbomb.py	Sun Jun 17 19:40:02 2007 +0200
@@ -275,6 +275,7 @@
         if bcc: m['Bcc'] = ', '.join(bcc)
         if opts['test']:
             ui.status('Displaying ', m['Subject'], ' ...\n')
+            ui.flush()
             fp = os.popen(os.getenv('PAGER', 'more'), 'w')
             try:
                 fp.write(m.as_string(0))
--- a/tests/test-patchbomb.out	Sun Jun 17 19:39:47 2007 +0200
+++ b/tests/test-patchbomb.out	Sun Jun 17 19:40:02 2007 +0200
@@ -1,4 +1,8 @@
 adding a
+This patch series consists of 1 patches.
+
+
+Displaying [PATCH] a ...
 Content-Type: text/plain; charset="us-ascii"
 MIME-Version: 1.0
 Content-Transfer-Encoding: 7bit
@@ -23,11 +27,16 @@
 @@ -0,0 +1,1 @@
 +a
 
-This patch series consists of 1 patches.
+adding b
+This patch series consists of 2 patches.
 
 
-Displaying [PATCH] a ...
-adding b
+Write the introductory message for the patch series.
+
+Finish with ^D or a dot on a line by itself.
+
+
+Displaying [PATCH 0 of 2] test ...
 Content-Type: text/plain; charset="us-ascii"
 MIME-Version: 1.0
 Content-Transfer-Encoding: 7bit
@@ -40,6 +49,7 @@
 
 test
 
+Displaying [PATCH 1 of 2] a ...
 Content-Type: text/plain; charset="us-ascii"
 MIME-Version: 1.0
 Content-Transfer-Encoding: 7bit
@@ -65,6 +75,7 @@
 @@ -0,0 +1,1 @@
 +a
 
+Displaying [PATCH 2 of 2] b ...
 Content-Type: text/plain; charset="us-ascii"
 MIME-Version: 1.0
 Content-Transfer-Encoding: 7bit
@@ -90,14 +101,3 @@
 @@ -0,0 +1,1 @@
 +b
 
-This patch series consists of 2 patches.
-
-
-Write the introductory message for the patch series.
-
-Finish with ^D or a dot on a line by itself.
-
-
-Displaying [PATCH 0 of 2] test ...
-Displaying [PATCH 1 of 2] a ...
-Displaying [PATCH 2 of 2] b ...