mercurial/hook.py
changeset 39818 24e493ec2229
parent 38723 f9b2d996ffa5
child 40971 8c8fcb385c46
equal deleted inserted replaced
39817:94c25f694ec3 39818:24e493ec2229
   148     ui.note(_("running hook %s: %s\n") % (name, cmd))
   148     ui.note(_("running hook %s: %s\n") % (name, cmd))
   149 
   149 
   150     if repo:
   150     if repo:
   151         cwd = repo.root
   151         cwd = repo.root
   152     else:
   152     else:
   153         cwd = pycompat.getcwd()
   153         cwd = encoding.getcwd()
   154     r = ui.system(cmd, environ=env, cwd=cwd, blockedtag='exthook-%s' % (name,))
   154     r = ui.system(cmd, environ=env, cwd=cwd, blockedtag='exthook-%s' % (name,))
   155 
   155 
   156     duration = util.timer() - starttime
   156     duration = util.timer() - starttime
   157     ui.log('exthook', 'exthook-%s: %s finished in %0.2f seconds\n',
   157     ui.log('exthook', 'exthook-%s: %s finished in %0.2f seconds\n',
   158            name, cmd, duration)
   158            name, cmd, duration)