Patchwork [2,of,6,V3] hook: remove redundant code to redirect http hook output to client stream

login
register
mail settings
Submitter Yuya Nishihara
Date Nov. 12, 2014, 2:38 p.m.
Message ID <161acee216ffa2782b08.1415803081@mimosa>
Download mbox | patch
Permalink /patch/6687/
State Accepted
Headers show

Comments

Yuya Nishihara - Nov. 12, 2014, 2:38 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1415798511 -32400
#      Wed Nov 12 22:21:51 2014 +0900
# Node ID 161acee216ffa2782b08ea119090c21207dd2b8f
# Parent  d7ce6e56b0702b789ba9628a8d8a6a6400ff7194
hook: remove redundant code to redirect http hook output to client stream

out=ui and out=ui.fout should be the same here.  ui.fout was introduced at
afccc64eea73, which was not available when out=ui was added at c37f35d7f2f5.

Patch

diff --git a/mercurial/hook.py b/mercurial/hook.py
--- a/mercurial/hook.py
+++ b/mercurial/hook.py
@@ -131,10 +131,7 @@  def _exthook(ui, repo, name, cmd, args, 
         cwd = repo.root
     else:
         cwd = os.getcwd()
-    if 'HG_URL' in env and env['HG_URL'].startswith('remote:http'):
-        r = util.system(cmd, environ=env, cwd=cwd, out=ui)
-    else:
-        r = util.system(cmd, environ=env, cwd=cwd, out=ui.fout)
+    r = util.system(cmd, environ=env, cwd=cwd, out=ui.fout)
 
     duration = time.time() - starttime
     ui.log('exthook', 'exthook-%s: %s finished in %0.2f seconds\n',