crew/88fc92b0b821: patchbomb.py fix
Giorgos Keramidas
keramida at ceid.upatras.gr
Sun Jun 17 21:53:19 CDT 2007
crew changeset 88fc92b0b8214aa677a40075d03df71bce7e21b2 tries to use
os['PAGER'] to get a copy of os.environ['PAGER'] and breaks the
patchbomb extension.
Attached below is a proposed fix:
# HG changeset patch
# User Giorgos Keramidas <keramida at ceid.upatras.gr>
# Date 1182135135 -10800
# Node ID 469dae025b66850fbb19836a29deb342c881c006
# Parent 88fc92b0b8214aa677a40075d03df71bce7e21b2
patchbomb: use os.environ['PAGER'] to read $PAGER
diff --git a/hgext/patchbomb.py b/hgext/patchbomb.py
--- a/hgext/patchbomb.py
+++ b/hgext/patchbomb.py
@@ -382,8 +382,13 @@ def patchbomb(ui, repo, *revs, **opts):
if opts['test']:
ui.status('Displaying ', m['Subject'], ' ...\n')
ui.flush()
- if 'PAGER' in os.environ:
- fp = os.popen(os['PAGER'], 'w')
+ pager = None
+ try:
+ pager = os.environ['PAGER']
+ except KeyError:
+ pass
+ if pager is not None:
+ fp = os.popen(pager, 'w')
else:
fp = ui
try:
More information about the Mercurial-devel
mailing list