Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/util.py @ 7164:cae820101762
Add util.popen3 fallback, simplify import of Popen3
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Sun, 19 Oct 2008 12:19:55 +0200 |
parents | 1be530a3180e |
children | b1aea76f7001 |
comparison
equal
deleted
inserted
replaced
7163:1be530a3180e | 7164:cae820101762 |
---|---|
74 p.tochild = p.stdin | 74 p.tochild = p.stdin |
75 p.childerr = p.stderr | 75 p.childerr = p.stderr |
76 return p | 76 return p |
77 except ImportError: | 77 except ImportError: |
78 subprocess = None | 78 subprocess = None |
79 import popen2 as _popen2 | 79 from popen2 import Popen3 |
80 popen2 = os.popen2 | 80 popen2 = os.popen2 |
81 Popen3 = _popen2.Popen3 | 81 popen3 = os.popen3 |
82 | 82 |
83 | 83 |
84 try: | 84 try: |
85 _encoding = os.environ.get("HGENCODING") | 85 _encoding = os.environ.get("HGENCODING") |
86 if sys.platform == 'darwin' and not _encoding: | 86 if sys.platform == 'darwin' and not _encoding: |