Fixed problem with Hg support under version 1.9 (mercurial.dispatch.dispatch() now...
authorPhil Schumm <philschumm@gmail.com>
Thu, 28 Jul 2011 12:42:11 +0000 (07:42 -0500)
committerPhil Schumm <philschumm@gmail.com>
Thu, 28 Jul 2011 12:42:11 +0000 (07:42 -0500)
libbe/storage/vcs/hg.py

index d2274ee40ad6cf024de055ffe2b5e0857e1a0cb9..acf391dab45cb07c4b3a53d96b46bcc2ebaccb35 100644 (file)
@@ -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(