comparison mercurial/hook.py @ 11469:c37f35d7f2f5 stable

http: deliver hook output to client
author Maxim Khitrov <mkhitrov@gmail.com>
date Wed, 30 Jun 2010 18:15:23 -0500
parents 25e572394f5c
children 789e0fa2fcea
comparison
equal deleted inserted replaced
11468:1c1126b1d919 11469:c37f35d7f2f5
96 96
97 if repo: 97 if repo:
98 cwd = repo.root 98 cwd = repo.root
99 else: 99 else:
100 cwd = os.getcwd() 100 cwd = os.getcwd()
101 r = util.system(cmd, environ=env, cwd=cwd) 101 if 'HG_URL' in env and env['HG_URL'].startswith('remote:http'):
102 r = util.system(cmd, environ=env, cwd=cwd, out=ui)
103 else:
104 r = util.system(cmd, environ=env, cwd=cwd)
102 if r: 105 if r:
103 desc, r = util.explain_exit(r) 106 desc, r = util.explain_exit(r)
104 if throw: 107 if throw:
105 raise util.Abort(_('%s hook %s') % (name, desc)) 108 raise util.Abort(_('%s hook %s') % (name, desc))
106 ui.warn(_('warning: %s hook %s\n') % (name, desc)) 109 ui.warn(_('warning: %s hook %s\n') % (name, desc))