tests: update test-archive to always use hashlib
We don't need the fallback to the old modules anymore.
undumprevlog: update to valid Python 3 syntax
I didn't do anything to ensure correctness here, just enough to avoid
tracebacks in the import checker, which uses the native ast module to
try and parse all our Python files.
tests: fixed a bytes/unicode confusion in the test runner
Differential Revision: https://phab.mercurial-scm.org/D483
run-tests: remove unused pygments token type
Differential Revision: https://phab.mercurial-scm.org/D478
run-tests: also highlight .py test files in summary messages
With the .t files highlighted, it's very easy to not even notice
failed .py tests.
Differential Revision: https://phab.mercurial-scm.org/D471
test-revset: make it work with chg
chg currently triggers `reposetup` as a side effect of `hg serve` command.
Therefore change the test to not output during `reposetup` to be compatible
with chg.
Differential Revision: https://phab.mercurial-scm.org/D455
copies: use intersectmatchers() in non-merge p1 optimization
This enables the optimization introduced by
d4247c306d82 for non-rebase cases.
Before, the match couldn't be narrowed if it was e.g. alwaysmatcher.
The logic is copied from
bd56bea5ecf8.
run-tests: pre instantiate pygments objects
Pre instantiate pygments objects to minimize overhead (cf.
20436925e080)
rebase: only change self.state when collapsing in _finishrebase
When the code executes to _finishrebase, self.state should be populated with
correct destinations and do not need to be written to a node. The code was
introduced by
8dc45c9059, which seems to avoid setting state values to None
but it didn't provide more details.
Differential Revision: https://phab.mercurial-scm.org/D346
rebase: choose merge base without unwanted revisions
Previously, when there are 2 merge base candidates, we choose p1 blindly,
which may make the merge result to have "unwanted content". This patch makes
rebase smarter - choose a merge base that does not have "unwanted revs" if
possible. Since we don't really have a good solution when there are
"unwanted revs", abort in that case.
Differential Revision: https://phab.mercurial-scm.org/D340