[PATCH 1 of 5] scmutil: list kind in abort
Yuya Nishihara
yuya at tcha.org
Mon Jan 11 09:18:23 CST 2016
On Sun, 10 Jan 2016 12:57:48 -0600, timeless wrote:
> # HG changeset patch
> # User timeless <timeless at mozdev.org>
> # Date 1451184347 0
> # Sun Dec 27 02:45:47 2015 +0000
> # Node ID 81f7508339fc28775b31ab1724c88eda6d11e85e
> # Parent 76fc5ac23473a25216f9cba2f977d1f56aa9df92
> scmutil: list kind in abort
>
> diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
> --- a/mercurial/scmutil.py
> +++ b/mercurial/scmutil.py
> @@ -143,10 +143,10 @@
> raise error.Abort(_("the name '%s' is reserved") % lbl)
> for c in (':', '\0', '\n', '\r'):
> if c in lbl:
> - raise error.Abort(_("%r cannot be used in a name") % c)
> + raise error.Abort(_("%r cannot be used in a %s name") % (c, kind))
> try:
> int(lbl)
> - raise error.Abort(_("cannot use an integer as a name"))
> + raise error.Abort(_("cannot use an integer as a %s name") % kind)
> except ValueError:
> pass
It appears that someone already tried it and found an i18n issue.
# Do not use the "kind" parameter in ui output.
# It makes strings difficult to translate.
(I didn't read the other patches yet.)
More information about the Mercurial-devel
mailing list