--- a/hgext/bugzilla.py Fri May 06 15:25:35 2011 +0200
+++ b/hgext/bugzilla.py Fri May 06 15:31:09 2011 +0200
@@ -394,7 +394,7 @@
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):
--- a/hgext/convert/common.py Fri May 06 15:25:35 2011 +0200
+++ b/hgext/convert/common.py Fri May 06 15:31:09 2011 +0200
@@ -308,7 +308,7 @@
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):
--- a/mercurial/hook.py Fri May 06 15:25:35 2011 +0200
+++ b/mercurial/hook.py Fri May 06 15:31:09 2011 +0200
@@ -109,7 +109,7 @@
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))
--- a/mercurial/mail.py Fri May 06 15:25:35 2011 +0200
+++ b/mercurial/mail.py Fri May 06 15:31:09 2011 +0200
@@ -91,7 +91,7 @@
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.
--- a/mercurial/patch.py Fri May 06 15:25:35 2011 +0200
+++ b/mercurial/patch.py Fri May 06 15:31:09 2011 +0200
@@ -1191,7 +1191,7 @@
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'):
--- a/mercurial/posix.py Fri May 06 15:25:35 2011 +0200
+++ b/mercurial/posix.py Fri May 06 15:31:09 2011 +0200
@@ -210,7 +210,7 @@
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:
--- a/mercurial/util.py Fri May 06 15:25:35 2011 +0200
+++ b/mercurial/util.py Fri May 06 15:31:09 2011 +0200
@@ -197,7 +197,7 @@
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 @@
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:
--- a/mercurial/windows.py Fri May 06 15:25:35 2011 +0200
+++ b/mercurial/windows.py Fri May 06 15:31:09 2011 +0200
@@ -155,7 +155,7 @@
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