# HG changeset patch # User Patrick Mezard # Date 1182102002 -7200 # Node ID 8e37342cb05deb1a0def9118492a68ead73320ab # Parent f7f2bd7f981d8b1cd4d60ae6cd7d36d3c9911e8d patchbomb: flush ui before delegating to pager. diff --git a/hgext/patchbomb.py b/hgext/patchbomb.py --- a/hgext/patchbomb.py +++ b/hgext/patchbomb.py @@ -275,6 +275,7 @@ def patchbomb(ui, repo, *revs, **opts): 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)) diff --git a/tests/test-patchbomb.out b/tests/test-patchbomb.out --- a/tests/test-patchbomb.out +++ b/tests/test-patchbomb.out @@ -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 @@ diff -r 000000000000 -r 8580ff50825a a @@ -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 @@ Cc: bar 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 @@ diff -r 000000000000 -r 8580ff50825a a @@ -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 @@ diff -r 8580ff50825a -r 97d72e5f12c7 b @@ -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 ...