[PATCH 2 of 2] subrepo: make the '(in subrepo %s)' hint more translation friendly
Angel Ezquerra
angel.ezquerra at gmail.com
Thu Jan 3 11:17:11 CST 2013
# HG changeset patch
# User Angel Ezquerra <angel.ezquerra at gmail.com>
# Date 1357231345 -3600
# Node ID 58dd1c9df93299eb2fd80292419998e078968e04
# Parent 5a1a5555319c13de73e51d271de5356b4a0656d0
subrepo: make the '(in subrepo %s)' hint more translation friendly
This patch makes the '(in subrepo %s)' hint that is printed when a subrepo
throws an error a bit easier to use tools that must parse mercurial's output,
such as GUI tools (e.g. TortoiseHg).
The message remains the same but the '%s' that was used to prepend the original
error message has been moved out of the translatable string.
diff --git a/mercurial/subrepo.py b/mercurial/subrepo.py
--- a/mercurial/subrepo.py
+++ b/mercurial/subrepo.py
@@ -29,7 +29,7 @@
raise ex
except error.Abort, ex:
subrepo = subrelpath(self)
- errormsg = _('%s (in subrepo %s)') % (str(ex), subrepo)
+ errormsg = str(ex) + ' ' + _('(in subrepo %s)') % subrepo
# avoid handling this exception by raising a SubrepoAbort exception
raise SubrepoAbort(errormsg, hint=ex.hint, subrepo=subrepo)
return res
More information about the Mercurial-devel
mailing list