mercurial/hook.py
branchstable
changeset 14711 ac70f8d5987c
parent 14234 600e64004eb5
child 14889 a59058fd074a
equal deleted inserted replaced
14709:6c7283faa967 14711:ac70f8d5987c
   105     else:
   105     else:
   106         cwd = os.getcwd()
   106         cwd = os.getcwd()
   107     if 'HG_URL' in env and env['HG_URL'].startswith('remote:http'):
   107     if 'HG_URL' in env and env['HG_URL'].startswith('remote:http'):
   108         r = util.system(cmd, environ=env, cwd=cwd, out=ui)
   108         r = util.system(cmd, environ=env, cwd=cwd, out=ui)
   109     else:
   109     else:
   110         r = util.system(cmd, environ=env, cwd=cwd)
   110         r = util.system(cmd, environ=env, cwd=cwd, out=ui.fout)
   111     if r:
   111     if r:
   112         desc, r = util.explainexit(r)
   112         desc, r = util.explainexit(r)
   113         if throw:
   113         if throw:
   114             raise util.Abort(_('%s hook %s') % (name, desc))
   114             raise util.Abort(_('%s hook %s') % (name, desc))
   115         ui.warn(_('warning: %s hook %s\n') % (name, desc))
   115         ui.warn(_('warning: %s hook %s\n') % (name, desc))