Mercurial > public > mercurial-scm > hg
diff hgext/pager.py @ 6548:962eb403165b
replace usage of os.popen() with util.popen()
To make this possible, I added a mode parameter to both implementations of
util.popen(), defaulting to 'r' (as it does in the Python stdlib).
author | Dirkjan Ochtman <dirkjan@ochtman.nl> |
---|---|
date | Mon, 14 Apr 2008 14:34:38 +0200 |
parents | 6c4e12682fb9 |
children | 292fb2ad2846 |
line wrap: on
line diff
--- a/hgext/pager.py Sun Apr 13 11:31:45 2008 -0500 +++ b/hgext/pager.py Mon Apr 14 14:34:38 2008 +0200 @@ -47,7 +47,7 @@ ''' import sys, os, signal -from mercurial import dispatch +from mercurial import dispatch, util def uisetup(ui): def pagecmd(ui, options, cmd, cmdfunc): @@ -56,7 +56,7 @@ attend = ui.configlist('pager', 'attend') if (cmd in attend or (cmd not in ui.configlist('pager', 'ignore') and not attend)): - sys.stderr = sys.stdout = os.popen(p, "wb") + sys.stderr = sys.stdout = util.popen(p, "wb") if ui.configbool('pager', 'quiet'): signal.signal(signal.SIGPIPE, signal.SIG_DFL) return oldrun(ui, options, cmd, cmdfunc)