Mercurial > public > mercurial-scm > evolve
annotate docs/tutorial/README.rst @ 7052:9ad6b690a518 stable tip
Added tag 11.1.8 for changeset 4f273a1ee194
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Tue, 11 Mar 2025 15:06:15 +0400 |
parents | 24f0b9c04ada |
children |
rev | line source |
---|---|
7019
24f0b9c04ada
docs: mark developer documentation as orphan to avoid Sphinx warnings
Anton Shestakov <av6@dwimlabs.net>
parents:
3376
diff
changeset
|
1 :orphan: |
24f0b9c04ada
docs: mark developer documentation as orphan to avoid Sphinx warnings
Anton Shestakov <av6@dwimlabs.net>
parents:
3376
diff
changeset
|
2 |
3376
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
3 ============================= |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
4 Training supports |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
5 ============================= |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
6 |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
7 Contributing |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
8 ============ |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
9 |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
10 The main source for the supports is the `slides.md` but it doesn't contains |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
11 all the source. |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
12 |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
13 The `slides.md` file contains several snippets that are replaced by other |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
14 files at compilation time. |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
15 |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
16 For example: |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
17 |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
18 .. code:: markdown |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
19 |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
20 ~~~raw-file |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
21 output/fix-a-bug-base.log |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
22 ~~~ |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
23 |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
24 Will replace this three lines by the content of the file `output/fix-a-bug- |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
25 base.log` which is generated when running the .t test file (see below for |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
26 instruction how to do that). |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
27 |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
28 .. code:: markdown |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
29 |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
30 ~~~graphviz-file |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
31 graphs/fix-bug-1.dot |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
32 ~~~ |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
33 |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
34 Will replace this three lines by the svg rendering of the graphviz definition |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
35 in the file `graphs/fix-bug-1.dot`. This file is generated when running the .t |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
36 test file (see below for instruction how to do that). |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
37 |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
38 |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
39 Environment preparation |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
40 ======================= |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
41 |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
42 This training supports needs pandoc to compile. |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
43 |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
44 You'll need a copy of the Mercurial source in order to generate the training |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
45 supports. |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
46 |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
47 You will also needs a functioning Python environment with the possibility to |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
48 use `pip install` with your current user. In doubt, you can use a `virtualenv |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
49 <https://virtualenv.pypa.io/en/stable/>`. |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
50 |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
51 You can then run the `prepare.sh` script that will configure the environment |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
52 for you. |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
53 |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
54 Generating the supports |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
55 ======================= |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
56 |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
57 First, you need to run a .t test file to generate a bunch of files. You can |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
58 run the test file with this command: |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
59 |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
60 `python /PATH/TO/MERCURIAL/tests/run-tests.py -l test-training.t` |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
61 |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
62 It should have generated files in at least two directories: `graphs` and |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
63 `output`. |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
64 |
aad37ffd7d58
doc: import the training support
Boris Feld <boris.feld@octobus.net>
parents:
diff
changeset
|
65 Finally, launch the `compile.sh` to generate the `index.html` output file. |