Mercurial > hg
comparison mercurial/localrepo.py @ 1882:c0320567931f
merge util.esystem and util.system.
author | Vadim Gelfer <vadim.gelfer@gmail.com> |
---|---|
date | Fri, 10 Mar 2006 22:42:59 -0800 |
parents | 05c7d75be925 |
children | b98160cfb2f3 |
comparison
equal
deleted
inserted
replaced
1880:05c7d75be925 | 1882:c0320567931f |
---|---|
53 | 53 |
54 def hook(self, name, throw=False, **args): | 54 def hook(self, name, throw=False, **args): |
55 def runhook(name, cmd): | 55 def runhook(name, cmd): |
56 self.ui.note(_("running hook %s: %s\n") % (name, cmd)) | 56 self.ui.note(_("running hook %s: %s\n") % (name, cmd)) |
57 env = dict([('HG_' + k.upper(), v) for k, v in args.iteritems()]) | 57 env = dict([('HG_' + k.upper(), v) for k, v in args.iteritems()]) |
58 r = util.esystem(cmd, environ=env, cwd=self.root) | 58 r = util.system(cmd, environ=env, cwd=self.root) |
59 if r: | 59 if r: |
60 desc, r = util.explain_exit(r) | 60 desc, r = util.explain_exit(r) |
61 if throw: | 61 if throw: |
62 raise util.Abort(_('%s hook %s') % (name, desc)) | 62 raise util.Abort(_('%s hook %s') % (name, desc)) |
63 self.ui.warn(_('error: %s hook %s\n') % (name, desc)) | 63 self.ui.warn(_('error: %s hook %s\n') % (name, desc)) |