# HG changeset patch # User Yuya Nishihara # Date 1274016194 -32400 # Node ID b25464e9b4481eb4e24fea0e73267fd26546bfc7 # Parent 6e65b451b62e6b5bf57e5df34e56214c78e762d6 patchbomb: respect HGPLAIN when piping --test output to PAGER It makes easy to use `hg email --test` from another tool. diff -r 6e65b451b62e -r b25464e9b448 hgext/patchbomb.py --- a/hgext/patchbomb.py Sat May 15 21:24:23 2010 -0500 +++ b/hgext/patchbomb.py Sun May 16 22:23:14 2010 +0900 @@ -450,7 +450,7 @@ if opts.get('test'): ui.status(_('Displaying '), subj, ' ...\n') ui.flush() - if 'PAGER' in os.environ: + if 'PAGER' in os.environ and not ui.plain(): fp = util.popen(os.environ['PAGER'], 'w') else: fp = ui