mercurial/help.py
changeset 43674 5be909dbe385
parent 43632 2e017696181f
child 43871 1390bb81163e
equal deleted inserted replaced
43673:f0bee3b1b847 43674:5be909dbe385
    34     templatekw,
    34     templatekw,
    35     ui as uimod,
    35     ui as uimod,
    36     util,
    36     util,
    37 )
    37 )
    38 from .hgweb import webcommands
    38 from .hgweb import webcommands
    39 from .utils import compression
    39 from .utils import (
       
    40     compression,
       
    41     resourceutil,
       
    42 )
    40 
    43 
    41 _exclkeywords = {
    44 _exclkeywords = {
    42     b"(ADVANCED)",
    45     b"(ADVANCED)",
    43     b"(DEPRECATED)",
    46     b"(DEPRECATED)",
    44     b"(EXPERIMENTAL)",
    47     b"(EXPERIMENTAL)",
   309 
   312 
   310 def loaddoc(topic, subdir=None):
   313 def loaddoc(topic, subdir=None):
   311     """Return a delayed loader for help/topic.txt."""
   314     """Return a delayed loader for help/topic.txt."""
   312 
   315 
   313     def loader(ui):
   316     def loader(ui):
   314         docdir = os.path.join(util.datapath, b'helptext')
   317         docdir = os.path.join(resourceutil.datapath, b'helptext')
   315         if subdir:
   318         if subdir:
   316             docdir = os.path.join(docdir, subdir)
   319             docdir = os.path.join(docdir, subdir)
   317         path = os.path.join(docdir, topic + b".txt")
   320         path = os.path.join(docdir, topic + b".txt")
   318         doc = gettext(util.readfile(path))
   321         doc = gettext(util.readfile(path))
   319         for rewriter in helphooks.get(topic, []):
   322         for rewriter in helphooks.get(topic, []):