[PATCH 1 of 6] gendoc: make sure locale path is set before loading any modules

Gregory Szorc gregory.szorc at gmail.com
Sat May 13 13:53:44 EDT 2017


On Sat, May 13, 2017 at 2:57 AM, Yuya Nishihara <yuya at tcha.org> wrote:

> # HG changeset patch
> # User Yuya Nishihara <yuya at tcha.org>
> # Date 1494665635 -32400
> #      Sat May 13 17:53:55 2017 +0900
> # Node ID e2ec0287484da7ab5fe232d750e6e6e0c903448b
> # Parent  d0d9a4fca59bcb0c0d5a53e7b3d2db2068844d1f
> gendoc: make sure locale path is set before loading any modules
>
> Otherwise some messages wouldn't be translated depending on when the util
> was loaded.
>

I've got patches 1-4 ready to be queued. But I'm not sure what magic
incantation I need to type to invoke my new reviewer powers. Once someone
tells me, they will be queued.


> diff --git a/doc/gendoc.py b/doc/gendoc.py
> --- a/doc/gendoc.py
> +++ b/doc/gendoc.py
> @@ -16,6 +16,10 @@ os.environ['HGMODULEPOLICY'] = 'allow'
>  # import from the live mercurial repo
>  sys.path.insert(0, "..")
>  from mercurial import demandimport; demandimport.enable()
> +# Load util so that the locale path is set by i18n.setdatapath() before
> +# calling _().
> +from mercurial import util
> +util.datapath
>  from mercurial import (
>      commands,
>      extensions,
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20170513/0493a217/attachment.html>


More information about the Mercurial-devel mailing list