changeset 22637:149141c3a25f

help: don't search randomly for help data - trust util.datapath The search was introduced in c904e76e3834 without a convincing explanation why it should be necessary ... except for consistency with templater handling. Now, just keep it simple.
author Mads Kiilerich <madski@unity3d.com>
date Sun, 28 Sep 2014 16:57:47 +0200
parents d844e220792a
children 0d0350cfc7ab
files mercurial/help.py
diffstat 1 files changed, 1 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/help.py	Sun Sep 28 16:57:37 2014 +0200
+++ b/mercurial/help.py	Sun Sep 28 16:57:47 2014 +0200
@@ -129,11 +129,7 @@
     """Return a delayed loader for help/topic.txt."""
 
     def loader():
-        for dir in ('.', '..'):
-            docdir = os.path.join(util.datapath, dir, 'help')
-            if os.path.isdir(docdir):
-                break
-
+        docdir = os.path.join(util.datapath, 'help')
         path = os.path.join(docdir, topic + ".txt")
         doc = gettext(util.readfile(path))
         for rewriter in helphooks.get(topic, []):