Mercurial > hg
comparison hgext/patchbomb.py @ 11183:b25464e9b448
patchbomb: respect HGPLAIN when piping --test output to PAGER
It makes easy to use `hg email --test` from another tool.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sun, 16 May 2010 22:23:14 +0900 |
parents | f66ca4431eb9 |
children | 687c7d395f20 |
comparison
equal
deleted
inserted
replaced
11181:6e65b451b62e | 11183:b25464e9b448 |
---|---|
448 if replyto: | 448 if replyto: |
449 m['Reply-To'] = ', '.join(replyto) | 449 m['Reply-To'] = ', '.join(replyto) |
450 if opts.get('test'): | 450 if opts.get('test'): |
451 ui.status(_('Displaying '), subj, ' ...\n') | 451 ui.status(_('Displaying '), subj, ' ...\n') |
452 ui.flush() | 452 ui.flush() |
453 if 'PAGER' in os.environ: | 453 if 'PAGER' in os.environ and not ui.plain(): |
454 fp = util.popen(os.environ['PAGER'], 'w') | 454 fp = util.popen(os.environ['PAGER'], 'w') |
455 else: | 455 else: |
456 fp = ui | 456 fp = ui |
457 generator = email.Generator.Generator(fp, mangle_from_=False) | 457 generator = email.Generator.Generator(fp, mangle_from_=False) |
458 try: | 458 try: |