docs/tutorial/README.rst
branchmercurial-4.1
changeset 3420 b21a3753255f
parent 3376 aad37ffd7d58
equal deleted inserted replaced
3382:f14ad1e83896 3420:b21a3753255f
       
     1 =============================
       
     2 Training supports
       
     3 =============================
       
     4 
       
     5 Contributing
       
     6 ============
       
     7 
       
     8 The main source for the supports is the `slides.md` but it doesn't contains
       
     9 all the source.
       
    10 
       
    11 The `slides.md` file contains several snippets that are replaced by other
       
    12 files at compilation time.
       
    13 
       
    14 For example:
       
    15 
       
    16 .. code:: markdown
       
    17 
       
    18   ~~~raw-file
       
    19   output/fix-a-bug-base.log
       
    20   ~~~
       
    21 
       
    22 Will replace this three lines by the content of the file `output/fix-a-bug-
       
    23 base.log` which is generated when running the .t test file (see below for
       
    24 instruction how to do that).
       
    25 
       
    26 .. code:: markdown
       
    27 
       
    28   ~~~graphviz-file
       
    29   graphs/fix-bug-1.dot
       
    30   ~~~
       
    31 
       
    32 Will replace this three lines by the svg rendering of the graphviz definition
       
    33 in the file `graphs/fix-bug-1.dot`. This file is generated when running the .t
       
    34 test file (see below for instruction how to do that).
       
    35 
       
    36 
       
    37 Environment preparation
       
    38 =======================
       
    39 
       
    40 This training supports needs pandoc to compile.
       
    41 
       
    42 You'll need a copy of the Mercurial source in order to generate the training
       
    43 supports.
       
    44 
       
    45 You will also needs a functioning Python environment with the possibility to
       
    46 use `pip install` with your current user. In doubt, you can use a `virtualenv
       
    47 <https://virtualenv.pypa.io/en/stable/>`.
       
    48 
       
    49 You can then run the `prepare.sh` script that will configure the environment
       
    50 for you.
       
    51 
       
    52 Generating the supports
       
    53 =======================
       
    54 
       
    55 First, you need to run a .t test file to generate a bunch of files. You can
       
    56 run the test file with this command:
       
    57 
       
    58 `python /PATH/TO/MERCURIAL/tests/run-tests.py -l test-training.t`
       
    59 
       
    60 It should have generated files in at least two directories: `graphs` and
       
    61 `output`.
       
    62 
       
    63 Finally, launch the `compile.sh` to generate the `index.html` output file.