Merge changes from Belchenko
authorAaron Bentley <abentley@panoramicfeedback.com>
Fri, 11 Aug 2006 16:07:10 +0000 (12:07 -0400)
committerAaron Bentley <abentley@panoramicfeedback.com>
Fri, 11 Aug 2006 16:07:10 +0000 (12:07 -0400)
1  2 
.bzrignore
libbe/rcs.py

diff --cc .bzrignore
index b5e01753a70008401ddd337db3b639dcdced602e,bc9f914d0739c072826e3c8cc6d59a1508c4c188..e7ebff7d70372573d22c1e89dbc2e1776c095b3e
@@@ -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 fddfeb6c4622aefdfdef9049fad4d093e278c1f7,549691ac72a320b52faf2450bfd1daaf65ee9be2..1c12068409a21f28abab9d566aafc7437991a983
@@@ -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)