diff --git a/hgext/bugzilla.py b/hgext/bugzilla.py --- a/hgext/bugzilla.py +++ b/hgext/bugzilla.py @@ -394,7 +394,7 @@ class bzmysql(bzaccess): if ret: self.ui.warn(out) raise util.Abort(_('bugzilla notify command %s') % - util.explain_exit(ret)[0]) + util.explainexit(ret)[0]) self.ui.status(_('done\n')) def get_user_id(self, user): diff --git a/hgext/convert/common.py b/hgext/convert/common.py --- a/hgext/convert/common.py +++ b/hgext/convert/common.py @@ -308,7 +308,7 @@ class commandline(object): if output: self.ui.warn(_('%s error:\n') % self.command) self.ui.warn(output) - msg = util.explain_exit(status)[0] + msg = util.explainexit(status)[0] raise util.Abort('%s %s' % (self.command, msg)) def run0(self, cmd, *args, **kwargs): diff --git a/mercurial/hook.py b/mercurial/hook.py --- a/mercurial/hook.py +++ b/mercurial/hook.py @@ -109,7 +109,7 @@ def _exthook(ui, repo, name, cmd, args, else: r = util.system(cmd, environ=env, cwd=cwd) if r: - desc, r = util.explain_exit(r) + desc, r = util.explainexit(r) if throw: raise util.Abort(_('%s hook %s') % (name, desc)) ui.warn(_('warning: %s hook %s\n') % (name, desc)) diff --git a/mercurial/mail.py b/mercurial/mail.py --- a/mercurial/mail.py +++ b/mercurial/mail.py @@ -91,7 +91,7 @@ def _sendmail(ui, sender, recipients, ms if ret: raise util.Abort('%s %s' % ( os.path.basename(program.split(None, 1)[0]), - util.explain_exit(ret)[0])) + util.explainexit(ret)[0])) def connect(ui): '''make a mail connection. return a function to send mail. diff --git a/mercurial/patch.py b/mercurial/patch.py --- a/mercurial/patch.py +++ b/mercurial/patch.py @@ -1191,7 +1191,7 @@ def _externalpatch(patcher, patchname, u code = fp.close() if code: raise PatchError(_("patch command failed: %s") % - util.explain_exit(code)[0]) + util.explainexit(code)[0]) return fuzz def internalpatch(patchobj, ui, strip, cwd, files=None, eolmode='strict'): diff --git a/mercurial/posix.py b/mercurial/posix.py --- a/mercurial/posix.py +++ b/mercurial/posix.py @@ -210,7 +210,7 @@ def testpid(pid): except OSError, inst: return inst.errno != errno.ESRCH -def explain_exit(code): +def explainexit(code): """return a 2-tuple (desc, code) describing a subprocess status (codes from kill are negative - not os.system/wait encoding)""" if code >= 0: diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -197,7 +197,7 @@ def tempfilter(s, cmd): code = 0 if code: raise Abort(_("command '%s' failed: %s") % - (cmd, explain_exit(code))) + (cmd, explainexit(code))) fp = open(outname, 'rb') r = fp.read() fp.close() @@ -369,7 +369,7 @@ def system(cmd, environ={}, cwd=None, on rc = 0 if rc and onerr: errmsg = '%s %s' % (os.path.basename(origcmd.split(None, 1)[0]), - explain_exit(rc)[0]) + explainexit(rc)[0]) if errprefix: errmsg = '%s: %s' % (errprefix, errmsg) try: diff --git a/mercurial/windows.py b/mercurial/windows.py --- a/mercurial/windows.py +++ b/mercurial/windows.py @@ -155,7 +155,7 @@ def popen(command, mode='r'): command += " 2> %s" % nulldev return os.popen(quotecommand(command), mode) -def explain_exit(code): +def explainexit(code): return _("exited with status %d") % code, code # if you change this stub into a real check, please try to implement the