From: Aaron Bentley Date: Fri, 11 Aug 2006 16:07:10 +0000 (-0400) Subject: Merge changes from Belchenko X-Git-Tag: 1.0.0~185^2~8 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=99993f498f2130b912f3418a72812d2bbacab68e;p=be.git Merge changes from Belchenko --- 99993f498f2130b912f3418a72812d2bbacab68e diff --cc .bzrignore index b5e0175,bc9f914..e7ebff7 --- a/.bzrignore +++ b/.bzrignore @@@ -3,6 -3,6 +3,7 @@@ Bugs-Everywhere-Web/beweb/config.p Bugs-Everywhere-Web/beweb/database.sqlite Bugs-Everywhere-Web/beweb/catwalk-session *.pyc - *.~1~ +*.sw[pon] - *.shelf + fte.dsk + *~ + ./.shelf diff --cc libbe/rcs.py index fddfeb6,549691a..1c12068 --- a/libbe/rcs.py +++ b/libbe/rcs.py @@@ -44,9 -46,14 +46,15 @@@ class CommandError(Exception) self.err_str = err_str self.status = status -def invoke(args, expect=(0,)): +def invoke(args, expect=(0,), cwd=None): + q = Popen(args, stdout=PIPE, stderr=PIPE, cwd=cwd) + if sys.platform != "win32": - q = Popen(args, stdin=PIPE, stdout=PIPE, stderr=PIPE) ++ q = Popen(args, stdin=PIPE, stdout=PIPE, stderr=PIPE, cwd=cwd) + else: + # win32 don't have os.execvp() so have to run command in a shell - q = Popen(args, stdin=PIPE, stdout=PIPE, stderr=PIPE, shell=True) - output = q.stdout.read() - error = q.stderr.read() ++ q = Popen(args, stdin=PIPE, stdout=PIPE, stderr=PIPE, shell=True, ++ cwd=cwd) + output, error = q.communicate() status = q.wait() if status not in expect: raise CommandError(error, status)