# HG changeset patch # User Idan Kamara # Date 2011-06-07 10:39:09 # Node ID 406b6d7bdcb98f46079443fe6454468644602e8f # Parent e59a7b8f521aa37a9e163851caa63f64d3fe2a54 dispatch: write shell alias output to ui out descriptor diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py --- a/mercurial/dispatch.py +++ b/mercurial/dispatch.py @@ -276,7 +276,7 @@ class cmdalias(object): replace['0'] = self.name replace['@'] = ' '.join(args) cmd = util.interpolate(r'\$', replace, cmd, escape_prefix=True) - return util.system(cmd, environ=env) + return util.system(cmd, environ=env, out=ui.fout) self.fn = fn return diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -354,7 +354,7 @@ def system(cmd, environ={}, cwd=None, on env = dict(os.environ) env.update((k, py2shell(v)) for k, v in environ.iteritems()) env['HG'] = hgexecutable() - if out is None: + if out is None or out == sys.__stdout__: rc = subprocess.call(cmd, shell=True, close_fds=closefds, env=env, cwd=cwd) else: