docs/conf.py
author Anton Shestakov <av6@dwimlabs.net>
Sat, 22 Jun 2019 18:37:21 +0800
branchstable
changeset 4698 b89495215c6e
parent 2964 9aec8fec2bf8
child 4901 ce163aaeba37
permissions -rw-r--r--
tests: demonstrate prune --pair not moving bookmark correctly After `mkcommit n2` line the bookmark is on the correct changeset, but when we prune --pair the two newly created changesets (revs 13 and 14), the bookmark gets moved to their ancestor (rev 0). Instead, it should've moved to the last of their successors (rev 12).
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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()
3f466d348047 doc: add documentation for evolve commands
Philippe Pepiot <phil@philpep.org>
parents: 2959
diff changeset
     5
from docutils import nodes
3f466d348047 doc: add documentation for evolve commands
Philippe Pepiot <phil@philpep.org>
parents: 2959
diff changeset
     6
from docutils.parsers.rst import Directive
3f466d348047 doc: add documentation for evolve commands
Philippe Pepiot <phil@philpep.org>
parents: 2959
diff changeset
     7
from mercurial import ui
3f466d348047 doc: add documentation for evolve commands
Philippe Pepiot <phil@philpep.org>
parents: 2959
diff changeset
     8
from mercurial import extensions as hgext
3f466d348047 doc: add documentation for evolve commands
Philippe Pepiot <phil@philpep.org>
parents: 2959
diff changeset
     9
from mercurial import commands
2964
9aec8fec2bf8 flake8 docs/conf.py
Philippe Pepiot <phil@philpep.org>
parents: 2963
diff changeset
    10
import os
2962
3f466d348047 doc: add documentation for evolve commands
Philippe Pepiot <phil@philpep.org>
parents: 2959
diff changeset
    11
2959
ef361938dfa1 doc: integrate graphviz graphs in tutorials
Boris Feld <boris.feld@octobus.net>
parents: 2951
diff changeset
    12
extensions = ["sphinx.ext.graphviz"]
2962
3f466d348047 doc: add documentation for evolve commands
Philippe Pepiot <phil@philpep.org>
parents: 2959
diff changeset
    13
2034
fc6183051112 flake8: remove "error" in documentation configuration
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 981
diff changeset
    14
# autoclass_content = 'both'
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    15
# 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
    16
# templates_path = []
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    17
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    18
# The suffix of source filenames.
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    19
source_suffix = '.rst'
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    20
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    21
# The master toctree document.
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    22
master_doc = 'index'
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    23
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    24
# General substitutions.
981
34e4e51affd1 docs: update copyright statement used by sphinx
Greg Ward <greg@gerg.ca>
parents: 766
diff changeset
    25
project = 'evolve extension for Mercurial'
34e4e51affd1 docs: update copyright statement used by sphinx
Greg Ward <greg@gerg.ca>
parents: 766
diff changeset
    26
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
    27
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    28
# 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
    29
# other places throughout the built documents.
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 short X.Y version.
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    32
version = '0.0'
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    33
# 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
    34
release = '0.0'
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    35
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    36
# 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
    37
# 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
    38
# today = ''
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    39
# 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
    40
today_fmt = '%B %d, %Y'
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    41
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    42
# 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
    43
unused_docs = []
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    44
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    45
# 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
    46
# for source files.
2034
fc6183051112 flake8: remove "error" in documentation configuration
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 981
diff changeset
    47
# exclude_dirs = []
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    48
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    49
# 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
    50
# default_role = None
161
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
# 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
    53
# add_function_parentheses = True
161
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
# 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
    56
# 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
    57
# add_module_names = True
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
# 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
    60
# 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
    61
# show_authors = False
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    62
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    63
# 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
    64
pygments_style = 'sphinx'
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    65
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    66
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    67
# Options for HTML output
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
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    70
# 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
    71
# 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
    72
# 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
    73
# html_style = 'sphinx-default.css'
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    74
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    75
# 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
    76
# "<project> v<release> documentation".
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    77
html_title = project
166
8f8a52cd0b9f big doc update
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 161
diff changeset
    78
html_theme = 'haiku'
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    79
html_theme_path = ['.']
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    80
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    81
# 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
    82
# html_short_title = None
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    83
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    84
# 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
    85
# the sidebar.
2034
fc6183051112 flake8: remove "error" in documentation configuration
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 981
diff changeset
    86
# html_logo = 'logo-evolve.svg'
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    87
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    88
# 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
    89
# 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
    90
# pixels large.
557
41688ca951e7 doc: add a logo
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 166
diff changeset
    91
html_favicon = 'logo-evolve.ico'
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    92
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    93
# 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
    94
# 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
    95
# 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
    96
html_static_path = ['static']
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
# 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
    99
# using the given strftime format.
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   100
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
   101
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   102
# 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
   103
# typographically correct entities.
2034
fc6183051112 flake8: remove "error" in documentation configuration
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 981
diff changeset
   104
# html_use_smartypants = True
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   105
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   106
# 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
   107
# html_sidebars = {}
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   108
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   109
# 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
   110
# template names.
2034
fc6183051112 flake8: remove "error" in documentation configuration
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 981
diff changeset
   111
# html_additional_pages = {}
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   112
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   113
# 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
   114
html_use_modindex = False
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
# 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
   117
# html_use_index = True
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
# 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
   120
# html_split_index = False
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   121
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   122
# 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
   123
# html_copy_source = True
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   124
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   125
# 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
   126
# 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
   127
# 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
   128
# html_use_opensearch = ''
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   129
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   130
# 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
   131
# html_file_suffix = '.html'
161
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   132
4e3f25ba5401 More doc and index with sphynx
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
   133
# 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
   134
# htmlhelp_basename = ''
2959
ef361938dfa1 doc: integrate graphviz graphs in tutorials
Boris Feld <boris.feld@octobus.net>
parents: 2951
diff changeset
   135
ef361938dfa1 doc: integrate graphviz graphs in tutorials
Boris Feld <boris.feld@octobus.net>
parents: 2951
diff changeset
   136
graphviz_output_format = "svg"
2962
3f466d348047 doc: add documentation for evolve commands
Philippe Pepiot <phil@philpep.org>
parents: 2959
diff changeset
   137
3f466d348047 doc: add documentation for evolve commands
Philippe Pepiot <phil@philpep.org>
parents: 2959
diff changeset
   138
class hghelpdirective(Directive):
3f466d348047 doc: add documentation for evolve commands
Philippe Pepiot <phil@philpep.org>
parents: 2959
diff changeset
   139
    has_content = True
3f466d348047 doc: add documentation for evolve commands
Philippe Pepiot <phil@philpep.org>
parents: 2959
diff changeset
   140
3f466d348047 doc: add documentation for evolve commands
Philippe Pepiot <phil@philpep.org>
parents: 2959
diff changeset
   141
    def run(self):
3f466d348047 doc: add documentation for evolve commands
Philippe Pepiot <phil@philpep.org>
parents: 2959
diff changeset
   142
        u = ui.ui()
2963
b84dda686fb1 doc: disable generating command documentation when mercurial is not up-to-date
Philippe Pepiot <phil@philpep.org>
parents: 2962
diff changeset
   143
        if not hasattr(u, 'disablepager'):
b84dda686fb1 doc: disable generating command documentation when mercurial is not up-to-date
Philippe Pepiot <phil@philpep.org>
parents: 2962
diff changeset
   144
            return []
2962
3f466d348047 doc: add documentation for evolve commands
Philippe Pepiot <phil@philpep.org>
parents: 2959
diff changeset
   145
        u.disablepager()
3f466d348047 doc: add documentation for evolve commands
Philippe Pepiot <phil@philpep.org>
parents: 2959
diff changeset
   146
        u.setconfig(
3f466d348047 doc: add documentation for evolve commands
Philippe Pepiot <phil@philpep.org>
parents: 2959
diff changeset
   147
            'extensions', 'evolve',
3f466d348047 doc: add documentation for evolve commands
Philippe Pepiot <phil@philpep.org>
parents: 2959
diff changeset
   148
            os.path.join(
3f466d348047 doc: add documentation for evolve commands
Philippe Pepiot <phil@philpep.org>
parents: 2959
diff changeset
   149
                os.path.abspath(os.path.dirname(__file__)),
3f466d348047 doc: add documentation for evolve commands
Philippe Pepiot <phil@philpep.org>
parents: 2959
diff changeset
   150
                os.pardir, 'hgext3rd', 'evolve'))
3f466d348047 doc: add documentation for evolve commands
Philippe Pepiot <phil@philpep.org>
parents: 2959
diff changeset
   151
        hgext.loadall(u)
3f466d348047 doc: add documentation for evolve commands
Philippe Pepiot <phil@philpep.org>
parents: 2959
diff changeset
   152
        u.pushbuffer()
3f466d348047 doc: add documentation for evolve commands
Philippe Pepiot <phil@philpep.org>
parents: 2959
diff changeset
   153
        commands.help_(u, self.content[0])
3f466d348047 doc: add documentation for evolve commands
Philippe Pepiot <phil@philpep.org>
parents: 2959
diff changeset
   154
        return [
3f466d348047 doc: add documentation for evolve commands
Philippe Pepiot <phil@philpep.org>
parents: 2959
diff changeset
   155
            nodes.literal_block(text=u.popbuffer())]
3f466d348047 doc: add documentation for evolve commands
Philippe Pepiot <phil@philpep.org>
parents: 2959
diff changeset
   156
3f466d348047 doc: add documentation for evolve commands
Philippe Pepiot <phil@philpep.org>
parents: 2959
diff changeset
   157
3f466d348047 doc: add documentation for evolve commands
Philippe Pepiot <phil@philpep.org>
parents: 2959
diff changeset
   158
def setup(app):
3f466d348047 doc: add documentation for evolve commands
Philippe Pepiot <phil@philpep.org>
parents: 2959
diff changeset
   159
    app.add_directive('hghelp', hghelpdirective)