chiark / gitweb /
Refactor subprocess creation
authorKarl Hasselström <kha@treskal.com>
Tue, 21 Aug 2007 16:15:38 +0000 (18:15 +0200)
committerKarl Hasselström <kha@treskal.com>
Sun, 26 Aug 2007 20:04:10 +0000 (22:04 +0200)
commitf0de3f92cc85c3d5e1dd3511578b01e46652e93c
tree45014536851cc9ddae85d73df39cf40907a8a641
parent5e888f30cf851fc0989ba73f935f6da7681d4903
Refactor subprocess creation

Instead of having a gazillion different little functions that wrap
os.spawnvp and popen2.Popen3, make a single wrapper that's flexible
enough to cater to everyone. Apart from making the code cleaner and
easier to read, this has the added benefit of making it possible to
add little things such as extra safety checks and logging.

Ideally, I'd have liked this wrapper to wrap subprocess.Popen, but
that's only available in Python 2.4 and up, so we'll have to make do
with os.spawnvp and popen2.Popen3 for now, even though they suck.

Signed-off-by: Karl Hasselström <kha@treskal.com>
stgit/basedir.py
stgit/commands/export.py
stgit/config.py
stgit/git.py
stgit/gitmergeonefile.py
stgit/run.py [new file with mode: 0644]