aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/storage/vcs
diff options
context:
space:
mode:
authorPhil Schumm <philschumm@gmail.com>2011-07-28 07:42:11 -0500
committerPhil Schumm <philschumm@gmail.com>2011-07-28 07:42:11 -0500
commitbb645f8e489b9f50cd0aec7237ec9adb721797a8 (patch)
treeaa728edd528375b61011eeab0b3166ed66fa900e /libbe/storage/vcs
parentbf52e18aad6e0e8effcadc6b90dfedf4d15b1859 (diff)
downloadbugseverywhere-bb645f8e489b9f50cd0aec7237ec9adb721797a8.tar.gz
Fixed problem with Hg support under version 1.9 (mercurial.dispatch.dispatch() now takes a single request object with option for capturing output stream)
Diffstat (limited to 'libbe/storage/vcs')
-rw-r--r--libbe/storage/vcs/hg.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/libbe/storage/vcs/hg.py b/libbe/storage/vcs/hg.py
index d2274ee..acf391d 100644
--- a/libbe/storage/vcs/hg.py
+++ b/libbe/storage/vcs/hg.py
@@ -83,14 +83,12 @@ class Hg(base.VCS):
assert len(kwargs) == 1, kwargs
fullargs = ['--cwd', kwargs['cwd']]
fullargs.extend(args)
- stdout = sys.stdout
- tmp_stdout = StringIO.StringIO()
- sys.stdout = tmp_stdout
+ output = StringIO.StringIO()
cwd = os.getcwd()
- mercurial.dispatch.dispatch(fullargs)
+ req = mercurial.dispatch.request(fullargs, fout=output)
+ mercurial.dispatch.dispatch(req)
os.chdir(cwd)
- sys.stdout = stdout
- return tmp_stdout.getvalue().rstrip('\n')
+ return output.getvalue().rstrip('\n')
def _vcs_get_user_id(self):
output = self._u_invoke_client(