evolve: use merge.update() for resolving phase divergence
Iterating over the manifest when tree manifests and narrowness is in
play produces entries for paths outside the narrowspec that represent
trees. For example, if the tests/ directory of the hg repo was not in
the narrowspec (and the hg repo was using tree manifests, which it
doesn't), then there would be a "tests/" entry in the manifest. The
merge code deals with some of these cases. For example, it's valid to
do a merge if only the local side changes directories outside the
narrowspec. That allows rebasing a local commit onto a public commit
that had changes to the excluded paths to work.
However, _resolvephasedivergent() was iterating of the manifests,
which resulted in crashes for some of our users when they tried to
resolve phase-divergent commits (actually content-divergent commits
that became phase-divergent after the intermediate rebase). We can fix
that by relying on merge.update(), since that already handles this
case.
[This re-install a changeset backed out for compatibility reason]
=============================
Training supports
=============================
Contributing
============
The main source for the supports is the `slides.md` but it doesn't contains
all the source.
The `slides.md` file contains several snippets that are replaced by other
files at compilation time.
For example:
.. code:: markdown
~~~raw-file
output/fix-a-bug-base.log
~~~
Will replace this three lines by the content of the file `output/fix-a-bug-
base.log` which is generated when running the .t test file (see below for
instruction how to do that).
.. code:: markdown
~~~graphviz-file
graphs/fix-bug-1.dot
~~~
Will replace this three lines by the svg rendering of the graphviz definition
in the file `graphs/fix-bug-1.dot`. This file is generated when running the .t
test file (see below for instruction how to do that).
Environment preparation
=======================
This training supports needs pandoc to compile.
You'll need a copy of the Mercurial source in order to generate the training
supports.
You will also needs a functioning Python environment with the possibility to
use `pip install` with your current user. In doubt, you can use a `virtualenv
<https://virtualenv.pypa.io/en/stable/>`.
You can then run the `prepare.sh` script that will configure the environment
for you.
Generating the supports
=======================
First, you need to run a .t test file to generate a bunch of files. You can
run the test file with this command:
`python /PATH/TO/MERCURIAL/tests/run-tests.py -l test-training.t`
It should have generated files in at least two directories: `graphs` and
`output`.
Finally, launch the `compile.sh` to generate the `index.html` output file.