copies: extract function _backwardcopies() for reversing renames
I'll add another callers in the next patch.
Differential Revision: https://phab.mercurial-scm.org/D10118
tests: demonstrate how grafted copies are counted when tracing across branches
This test demonstrates a regression from
1d6d1a15.
Differential Revision: https://phab.mercurial-scm.org/D10117
typing: add some type annotations to mercurial/pathutil.py
Differential Revision: https://phab.mercurial-scm.org/D10128
typing: add some type annotations to mercurial/util.py
Differential Revision: https://phab.mercurial-scm.org/D10127
typing: add some type annotations to mercurial/phases.py
Some of these were helpful in typing other modules, and then I typed the
easy-ish ones. Black forces the long `Phasedefaults` definition to be wrapped,
which pytype seems OK with (as shown with `reveal_type()`), but it does seem to
confuse PyCharm a bit.
Differential Revision: https://phab.mercurial-scm.org/D10126
typing: add type annotations to the public methods of mercurial/subrepoutil.py
Differential Revision: https://phab.mercurial-scm.org/D10125