annotate docs/conf.py @ 6889:a66cf9008781

obslog: also display patch for rebased changesets This applies the same logic that is used for "merge-diff" to rebased changesets. The successors' content is compared to the content of the predecessors rebased in-memory on the new parents. This highlights the changes that were actually introduced while rebasing (like conflict resolution or API adjustment). As a side effect, obslog now also outputs slightly more diffs for splits, showing what parts of the original big changeset were moved to the smaller split components (but for now it only works for the first few changesets).
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sun, 22 Sep 2024 02:58:54 +0200
parents c77bbd1adeee
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
1 # Add any Sphinx extension module names here, as strings. They can be extensions
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
2 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
2962
3f466d348047 doc: add documentation for evolve commands
Philippe Pepiot <phil@philpep.org>
parents: 2959
diff changeset
3 from mercurial import demandimport
3f466d348047 doc: add documentation for evolve commands
Philippe Pepiot <phil@philpep.org>
parents: 2959
diff changeset
4 demandimport.disable()
5654
034873ca0f88 docs: refactor docs/conf.py a bit
Anton Shestakov <av6@dwimlabs.net>
parents: 4901
diff changeset
5
034873ca0f88 docs: refactor docs/conf.py a bit
Anton Shestakov <av6@dwimlabs.net>
parents: 4901
diff changeset
6 from os.path import (
034873ca0f88 docs: refactor docs/conf.py a bit
Anton Shestakov <av6@dwimlabs.net>
parents: 4901
diff changeset
7 abspath,
034873ca0f88 docs: refactor docs/conf.py a bit
Anton Shestakov <av6@dwimlabs.net>
parents: 4901
diff changeset
8 dirname,
034873ca0f88 docs: refactor docs/conf.py a bit
Anton Shestakov <av6@dwimlabs.net>
parents: 4901
diff changeset
9 join,
034873ca0f88 docs: refactor docs/conf.py a bit
Anton Shestakov <av6@dwimlabs.net>
parents: 4901
diff changeset
10 )
034873ca0f88 docs: refactor docs/conf.py a bit
Anton Shestakov <av6@dwimlabs.net>
parents: 4901
diff changeset
11
2962
3f466d348047 doc: add documentation for evolve commands
Philippe Pepiot <phil@philpep.org>
parents: 2959
diff changeset
12 from docutils import nodes
3f466d348047 doc: add documentation for evolve commands
Philippe Pepiot <phil@philpep.org>
parents: 2959
diff changeset
13 from docutils.parsers.rst import Directive
5654
034873ca0f88 docs: refactor docs/conf.py a bit
Anton Shestakov <av6@dwimlabs.net>
parents: 4901
diff changeset
14
034873ca0f88 docs: refactor docs/conf.py a bit
Anton Shestakov <av6@dwimlabs.net>
parents: 4901
diff changeset
15 from mercurial import (
034873ca0f88 docs: refactor docs/conf.py a bit
Anton Shestakov <av6@dwimlabs.net>
parents: 4901
diff changeset
16 commands,
034873ca0f88 docs: refactor docs/conf.py a bit
Anton Shestakov <av6@dwimlabs.net>
parents: 4901
diff changeset
17 extensions as hgext,
5661
4b6b559b92c8 docs: make docs/conf.py compatible with Python 3
Anton Shestakov <av6@dwimlabs.net>
parents: 5654
diff changeset
18 pycompat,
5654
034873ca0f88 docs: refactor docs/conf.py a bit
Anton Shestakov <av6@dwimlabs.net>
parents: 4901
diff changeset
19 ui as uimod,
034873ca0f88 docs: refactor docs/conf.py a bit
Anton Shestakov <av6@dwimlabs.net>
parents: 4901
diff changeset
20 )
2962
3f466d348047 doc: add documentation for evolve commands
Philippe Pepiot <phil@philpep.org>
parents: 2959
diff changeset
21
2959
ef361938dfa1 doc: integrate graphviz graphs in tutorials
Boris Feld <boris.feld@octobus.net>
parents: 2951
diff changeset
22 extensions = ["sphinx.ext.graphviz"]
2962
3f466d348047 doc: add documentation for evolve commands
Philippe Pepiot <phil@philpep.org>
parents: 2959
diff changeset
23
2034
fc6183051112 flake8: remove "error" in documentation configuration
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 981
diff changeset
24 # autoclass_content = 'both'
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
25 # Add any paths that contain templates here, relative to this directory.
2034
fc6183051112 flake8: remove "error" in documentation configuration
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 981
diff changeset
26 # templates_path = []
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
27
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
28 # The suffix of source filenames.
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
29 source_suffix = '.rst'
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
30
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
31 # The master toctree document.
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
32 master_doc = 'index'
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
33
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
34 # General substitutions.
981
34e4e51affd1 docs: update copyright statement used by sphinx
Greg Ward <greg@gerg.ca>
parents: 766
diff changeset
35 project = 'evolve extension for Mercurial'
34e4e51affd1 docs: update copyright statement used by sphinx
Greg Ward <greg@gerg.ca>
parents: 766
diff changeset
36 copyright = '2010-2014, Pierre-Yves David, Greg Ward, and contributors'
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
37
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
38 # The default replacements for |version| and |release|, also used in various
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
39 # other places throughout the built documents.
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
40 #
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
41 # The short X.Y version.
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
42 version = '0.0'
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
43 # The full version, including alpha/beta/rc tags.
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
44 release = '0.0'
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
45
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
46 # There are two options for replacing |today|: either, you set today to some
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
47 # non-false value, then it is used:
2034
fc6183051112 flake8: remove "error" in documentation configuration
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 981
diff changeset
48 # today = ''
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
49 # Else, today_fmt is used as the format for a strftime call.
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
50 today_fmt = '%B %d, %Y'
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
51
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
52 # List of documents that shouldn't be included in the build.
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
53 unused_docs = []
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
54
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
55 # List of directories, relative to source directories, that shouldn't be searched
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
56 # for source files.
2034
fc6183051112 flake8: remove "error" in documentation configuration
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 981
diff changeset
57 # exclude_dirs = []
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
58
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
59 # The reST default role (used for this markup: `text`) to use for all documents.
2034
fc6183051112 flake8: remove "error" in documentation configuration
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 981
diff changeset
60 # default_role = None
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
61
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
62 # If true, '()' will be appended to :func: etc. cross-reference text.
2034
fc6183051112 flake8: remove "error" in documentation configuration
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 981
diff changeset
63 # add_function_parentheses = True
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
64
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
65 # If true, the current module name will be prepended to all description
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
66 # unit titles (such as .. function::).
2034
fc6183051112 flake8: remove "error" in documentation configuration
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 981
diff changeset
67 # add_module_names = True
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
68
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
69 # If true, sectionauthor and moduleauthor directives will be shown in the
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
70 # output. They are ignored by default.
2034
fc6183051112 flake8: remove "error" in documentation configuration
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 981
diff changeset
71 # show_authors = False
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
72
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
73 # The name of the Pygments (syntax highlighting) style to use.
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
74 pygments_style = 'sphinx'
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
75
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
76
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
77 # Options for HTML output
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
78 # -----------------------
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
79
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
80 # The style sheet to use for HTML and HTML Help pages. A file of that name
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
81 # must exist either in Sphinx' static/ path, or in one of the custom paths
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
82 # given in html_static_path.
2034
fc6183051112 flake8: remove "error" in documentation configuration
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 981
diff changeset
83 # html_style = 'sphinx-default.css'
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
84
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
85 # The name for this set of Sphinx documents. If None, it defaults to
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
86 # "<project> v<release> documentation".
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
87 html_title = project
166
8f8a52cd0b9f big doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 161
diff changeset
88 html_theme = 'haiku'
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
89 html_theme_path = ['.']
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
90
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
91 # A shorter title for the navigation bar. Default is the same as html_title.
2034
fc6183051112 flake8: remove "error" in documentation configuration
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 981
diff changeset
92 # html_short_title = None
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
93
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
94 # The name of an image file (within the static path) to place at the top of
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
95 # the sidebar.
2034
fc6183051112 flake8: remove "error" in documentation configuration
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 981
diff changeset
96 # html_logo = 'logo-evolve.svg'
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
97
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
98 # The name of an image file (within the static path) to use as favicon of the
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
99 # docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
100 # pixels large.
6608
c77bbd1adeee docs: use full path to logo-evolve.ico in html_favicon
Anton Shestakov <av6@dwimlabs.net>
parents: 5661
diff changeset
101 html_favicon = 'static/logo-evolve.ico'
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
102
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
103 # Add any paths that contain custom static files (such as style sheets) here,
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
104 # relative to this directory. They are copied after the builtin static files,
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
105 # so a file named "default.css" will overwrite the builtin "default.css".
557
41688ca951e7 doc: add a logo
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 166
diff changeset
106 html_static_path = ['static']
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
107
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
108 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
109 # using the given strftime format.
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
110 html_last_updated_fmt = '%b %d, %Y'
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
111
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
112 # If true, SmartyPants will be used to convert quotes and dashes to
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
113 # typographically correct entities.
2034
fc6183051112 flake8: remove "error" in documentation configuration
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 981
diff changeset
114 # html_use_smartypants = True
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
115
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
116 # Custom sidebar templates, maps document names to template names.
2034
fc6183051112 flake8: remove "error" in documentation configuration
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 981
diff changeset
117 # html_sidebars = {}
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
118
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
119 # Additional templates that should be rendered to pages, maps page names to
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
120 # template names.
2034
fc6183051112 flake8: remove "error" in documentation configuration
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 981
diff changeset
121 # html_additional_pages = {}
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
122
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
123 # If false, no module index is generated.
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
124 html_use_modindex = False
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
125
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
126 # If false, no index is generated.
2034
fc6183051112 flake8: remove "error" in documentation configuration
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 981
diff changeset
127 # html_use_index = True
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
128
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
129 # If true, the index is split into individual pages for each letter.
2034
fc6183051112 flake8: remove "error" in documentation configuration
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 981
diff changeset
130 # html_split_index = False
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
131
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
132 # If true, the reST sources are included in the HTML build as _sources/<name>.
2034
fc6183051112 flake8: remove "error" in documentation configuration
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 981
diff changeset
133 # html_copy_source = True
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
134
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
135 # If true, an OpenSearch description file will be output, and all pages will
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
136 # contain a <link> tag referring to it. The value of this option must be the
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
137 # base URL from which the finished HTML is served.
2034
fc6183051112 flake8: remove "error" in documentation configuration
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 981
diff changeset
138 # html_use_opensearch = ''
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
139
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
140 # If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
2034
fc6183051112 flake8: remove "error" in documentation configuration
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 981
diff changeset
141 # html_file_suffix = '.html'
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
142
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
143 # Output file base name for HTML help builder.
2034
fc6183051112 flake8: remove "error" in documentation configuration
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 981
diff changeset
144 # htmlhelp_basename = ''
2959
ef361938dfa1 doc: integrate graphviz graphs in tutorials
Boris Feld <boris.feld@octobus.net>
parents: 2951
diff changeset
145
ef361938dfa1 doc: integrate graphviz graphs in tutorials
Boris Feld <boris.feld@octobus.net>
parents: 2951
diff changeset
146 graphviz_output_format = "svg"
2962
3f466d348047 doc: add documentation for evolve commands
Philippe Pepiot <phil@philpep.org>
parents: 2959
diff changeset
147
3f466d348047 doc: add documentation for evolve commands
Philippe Pepiot <phil@philpep.org>
parents: 2959
diff changeset
148 class hghelpdirective(Directive):
3f466d348047 doc: add documentation for evolve commands
Philippe Pepiot <phil@philpep.org>
parents: 2959
diff changeset
149 has_content = True
3f466d348047 doc: add documentation for evolve commands
Philippe Pepiot <phil@philpep.org>
parents: 2959
diff changeset
150
3f466d348047 doc: add documentation for evolve commands
Philippe Pepiot <phil@philpep.org>
parents: 2959
diff changeset
151 def run(self):
5654
034873ca0f88 docs: refactor docs/conf.py a bit
Anton Shestakov <av6@dwimlabs.net>
parents: 4901
diff changeset
152 ui = uimod.ui()
034873ca0f88 docs: refactor docs/conf.py a bit
Anton Shestakov <av6@dwimlabs.net>
parents: 4901
diff changeset
153 if not hasattr(ui, 'disablepager'):
2963
b84dda686fb1 doc: disable generating command documentation when mercurial is not up-to-date
Philippe Pepiot <phil@philpep.org>
parents: 2962
diff changeset
154 return []
5654
034873ca0f88 docs: refactor docs/conf.py a bit
Anton Shestakov <av6@dwimlabs.net>
parents: 4901
diff changeset
155 ui.disablepager()
034873ca0f88 docs: refactor docs/conf.py a bit
Anton Shestakov <av6@dwimlabs.net>
parents: 4901
diff changeset
156 rootdir = abspath(dirname(dirname(__file__)))
034873ca0f88 docs: refactor docs/conf.py a bit
Anton Shestakov <av6@dwimlabs.net>
parents: 4901
diff changeset
157 evolvepath = join(rootdir, 'hgext3rd', 'evolve')
5661
4b6b559b92c8 docs: make docs/conf.py compatible with Python 3
Anton Shestakov <av6@dwimlabs.net>
parents: 5654
diff changeset
158 ui.setconfig(b'extensions', b'evolve', pycompat.bytestr(evolvepath))
5654
034873ca0f88 docs: refactor docs/conf.py a bit
Anton Shestakov <av6@dwimlabs.net>
parents: 4901
diff changeset
159 hgext.loadall(ui)
034873ca0f88 docs: refactor docs/conf.py a bit
Anton Shestakov <av6@dwimlabs.net>
parents: 4901
diff changeset
160 ui.pushbuffer()
034873ca0f88 docs: refactor docs/conf.py a bit
Anton Shestakov <av6@dwimlabs.net>
parents: 4901
diff changeset
161 commands.help_(ui, self.content[0].encode('utf-8'))
034873ca0f88 docs: refactor docs/conf.py a bit
Anton Shestakov <av6@dwimlabs.net>
parents: 4901
diff changeset
162 return [nodes.literal_block(text=ui.popbuffer().decode('utf-8'))]
2962
3f466d348047 doc: add documentation for evolve commands
Philippe Pepiot <phil@philpep.org>
parents: 2959
diff changeset
163
3f466d348047 doc: add documentation for evolve commands
Philippe Pepiot <phil@philpep.org>
parents: 2959
diff changeset
164
3f466d348047 doc: add documentation for evolve commands
Philippe Pepiot <phil@philpep.org>
parents: 2959
diff changeset
165 def setup(app):
3f466d348047 doc: add documentation for evolve commands
Philippe Pepiot <phil@philpep.org>
parents: 2959
diff changeset
166 app.add_directive('hghelp', hghelpdirective)