revsetbenchmark: add `author(mpm) or author(lmoscovicz)` to the canonical list

This matters as `author(mpm)` have a lot of matches evenly split in the repo,
while `author(lmoscoviz)` have less match (and later). This changes the execution
path of the "or" operator a lot.
run-tests: create classes for representing tests

Currently, the state for an individual test is scattered across a number
of functions and variables. This patch begins a process of isolating a
single test's state into instances of a class. It does this by
establishing a new Test base class and child classes for Python tests
and T tests. The class currently has a run() API that proxies into the
existing "runner" functions. Upcoming patches will move the logic for
each test type into the class.

--HG--
extra : rebase_source : 9347d5de878daae46aa4e8c3c58edf5c69f720ba
run-tests: move testtmp into Test class

This patch starts the process of moving test-specific variables into the
Test class. The ultimate goal is to be able to instantiate a Test with
minimal arguments and to call run() on it without too much thinking.
This will make it much easier to run tests from other contexts. It will
also enable things like running a test multiple times.

--HG--
extra : rebase_source : 0e38041ce57728e26577baea01e49b9bc9abffb5
run-tests: move replacements generation into Test

The API is a bit funky. Things will look better once all state is
captured in Test.

--HG--
extra : rebase_source : 78b00876b71f5999ee914d09bfa5f8d72e01a5c9
run-tests: move createenv() into Test

createenv() is consulting lots of test-specific variables. It makes
sense to attach it to the Test class.

--HG--
extra : rebase_source : 9d4394bb5b03b5b159ed72233c6e771f4acb015f
run-tests: move createhgrc() call into Test.run()

createhgrc() is an implementation detail of how tests are run. It makes
sense to move it into Test.run().

Note that this will cause the test execution time to include the
creation of hgrc. The author does not believe this is a significant
change worth worrying about.

--HG--
extra : rebase_source : 048775fe444339131019a8e6efa8acacd50350a7
run-tests: move replacements and port management into Test

replacements and ports are really implementation details of a Test. They
have been moved to instance variables.

--HG--
extra : rebase_source : 4aa83ced55bd70338668a24676aefe1ca4bd17ea
run-tests: move killdaemons into Test.run()

killdaemons() was the only part of runone() looking at env variables. We
move killdaemons() into Test.run() to enable us to fully move env into
Test.

--HG--
extra : rebase_source : 4f08a276e2553a196f52eed7274b39cf707d144e
run-tests: move env into Test

Environment variables are an implementation detail of how tests are
executed. This patch moves environment variable logic into Test and
completely hides it from the outside.

With this patch, a Test can be executed with two lines: init + run().
Tests are still single-use and take a more arguments to the constructor
than likely necessary. These will get addressed in subsequent patches.

--HG--
extra : rebase_source : 17d3d6a21e66fdee6ba10107ee36f874cd460aff
run-tests: clean up temp directory variables

testtmp is an implementation detail. It didn't need to be exposed to the
world.

threadtmp is derived from count. It is now created as part of the
constructor and mostly hidden from the outside world.

--HG--
extra : rebase_source : ccd482b05f95c5dd99014b6e46cbf45b26350ff6
run-tests: capture execution results in a TestResult class

Some implementation details of test execution still live outside of
Test. These include determining what a result means and cleaning up
after the test.

To move to the world where more of this logic can live inside Test or a
derived object, the logic for test execution needs to be refactored.
Specifically, exception trapping and opportunities for result processing
need to be moved into Test.

This patch starts the process by establishing a TestResult class for
holding the results of a test execution. In order to actually use this
class, exception trapping and execution time recording needed to be
moved into Test.run().

--HG--
extra : rebase_source : 162b91cb4c70eaa687fb083674d7ca90f3ff650f
run-tests: pass TestResult into run()

--HG--
extra : rebase_source : fb6c9ddf10a708d07c85eb6d58b9d5f2e319c9bd
run-tests: give TestResult a skipped attribute

--HG--
extra : rebase_source : 2c02d1690357029bbb9395127a5c506333539996
run-tests: capture reference output in TestResult class

--HG--
extra : rebase_source : 98529b75e48be6a5420beeb65168237df579484a
run-tests: allow Test.run() to run multiple times

Test.run() can now be executed multiple times on the same Test instance.
This feature is currently unused and there are no plans to implement it.
The main reason for this work was to refactor testtmp, replacements, and
env to be run-time specific as opposed to Test instance specific.

--HG--
extra : rebase_source : 58fe10fbaf86c5f7fe2ede04909578830cc0e6d6
run-tests: remove threadtmp in Test.cleanup()

threadtmp is an implementation detail. We move the cleanup of this
directory to Test.cleanup() and make the variable internal. The
cleanup function will eventually disappear into unittest machinery.

--HG--
extra : rebase_source : 0abd6febc51f703a17ff2552f70b7141ae7dc5f2
run-tests: roll pytest() into PythonTest._run()

Python was the old runner function. It no longer needs to exist since
the PythonTest class took its job.

--HG--
extra : rebase_source : b041ccd565244d9cc85460fa27caaf3553c2215a
run-tests: move t test parsing into its own function

Test parsing is somewhat complicated. This patch extracts it into its
own function.

The impetus of this patch is folding tsttest() into the TTest class.
Subsequent patches will continue this work until tsttest() no longer
exists.

--HG--
extra : rebase_source : 94d5bc24364c48ea0aaf486664c004456fa128a9
run-tests: move t test execution from tsttest() to TTest.run()

After this patch, tsttest() only contains output/result processing.

--HG--
extra : rebase_source : d2abd0ce809a13cf34c547e21b79c1b7ff031fb7
run-tests: finish moving tsttest() into TTest

--HG--
extra : rebase_source : e4823a534b7a3c98ab53f0c2142a1148adab8892