[PATCH 1 of 6] gendoc: make sure locale path is set before loading any modules
Yuya Nishihara
yuya at tcha.org
Sat May 13 09:57:32 UTC 2017
# 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.
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,
More information about the Mercurial-devel
mailing list