Mercurial > hg > mercurial-crew-with-dirclash
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 +++ 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))
--- 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 ...