Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/hook.py @ 23268:0fd3862ef425
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.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Wed, 12 Nov 2014 22:21:51 +0900 |
parents | b009dd135aa0 |
children | 41c03b7592ed |
comparison
equal
deleted
inserted
replaced
23267:d7ce6e56b070 | 23268:0fd3862ef425 |
---|---|
129 | 129 |
130 if repo: | 130 if repo: |
131 cwd = repo.root | 131 cwd = repo.root |
132 else: | 132 else: |
133 cwd = os.getcwd() | 133 cwd = os.getcwd() |
134 if 'HG_URL' in env and env['HG_URL'].startswith('remote:http'): | 134 r = util.system(cmd, environ=env, cwd=cwd, out=ui.fout) |
135 r = util.system(cmd, environ=env, cwd=cwd, out=ui) | |
136 else: | |
137 r = util.system(cmd, environ=env, cwd=cwd, out=ui.fout) | |
138 | 135 |
139 duration = time.time() - starttime | 136 duration = time.time() - starttime |
140 ui.log('exthook', 'exthook-%s: %s finished in %0.2f seconds\n', | 137 ui.log('exthook', 'exthook-%s: %s finished in %0.2f seconds\n', |
141 name, cmd, duration) | 138 name, cmd, duration) |
142 if r: | 139 if r: |