sapling/edenscm/mercurial/help
Jun Wu 4d6591aee7 help: move help docs to Python code
Summary:
It's a headache about how to deal with static files (help/, template/, default
config), since we have 3 different ways of packing the Python code: normal
(linux), embedded (Windows), and fbcode xar (linux). The latter two need
workarounds to make `help/` work, and for the "embedded" case, It is currently
broken.

This diff moves user-facing `help/` files to a Python module to remove the need
of special casing it in different ways.

`helptext.py` was created via:

  import glob, os
  for path in glob.glob('help/*.txt'):
      if path.count('.') == 1:
          name = path.split('.')[0]
          name = os.path.basename(name)
          if '-' in name:
              name = 'globals()[%r]' % name
          print("%s = r'''%s'''\n\n" % (name, open(path, "rb").read()))
          os.unlink(path)

The help text about named branches are removed to make `test-check-help.t`
happy.

Reviewed By: mitrandir77

Differential Revision: D15291676

fbshipit-source-id: 2320bd59369ef092d8c06b8539e401799a0467ef
2019-05-13 16:23:40 -07:00
..
internals manifest: drop manifestv2 support 2019-03-26 13:32:45 -07:00
subversion codemod: move Python packages to edenscm 2019-01-28 18:35:41 -08:00
hg-ssh.8.txt codemod: move Python packages to edenscm 2019-01-28 18:35:41 -08:00
hg.1.txt ignore: disable hgignore by default 2019-03-20 22:32:58 -07:00
hgrc.5.txt ignore: disable hgignore by default 2019-03-20 22:32:58 -07:00