fuzz: fix mpatch_corpus to not have an overridden __repr__ on py3
Differential Revision: https://phab.mercurial-scm.org/D7606
formatting: fix some recent formatting regressions
Differential Revision: https://phab.mercurial-scm.org/D7605
remotefilelog: remove the `ensurestart` usage
The option does not seems to do what we want since it does not wait on the background
process actually starting (eg: taking the lock). And the race have been dealt
with another way anyway.
This effectively back out changeset
2c74337e6483.
Differential Revision: https://phab.mercurial-scm.org/D7590
remotefilelog: remove most of the debugwait* command in the tests
Since we use a dedicated developer config, we do not need them anymore.
Differential Revision: https://phab.mercurial-scm.org/D7589
remotefilelog: use the correct redirection in tests
The test were using '2>%1' which just redirect stderr in the "%1" file. The
intend was '2>&1' which redirect stderr on stdin.
This impact tests because some commit were picking up this '%1' files.
Differential Revision: https://phab.mercurial-scm.org/D7588
remotefilelog: remove most sleep in tests
Now that we removed most of the races, we can remove the infamous sleeps.
Differential Revision: https://phab.mercurial-scm.org/D7587
remotefilelog: have command wait for background task in the tests
We leverage the feature introduced in the two previous commit to have the main
command wait for the background task to be finished before returning.
All test still pass and instability seems to have gone away.
Most of the sleep and explicit wait are now useless and will be cleaned up in
later changesets.
Differential Revision: https://phab.mercurial-scm.org/D7586
remotefilelog: add a developer option to wait for background processes
In order to block the main command on the subprocess exiting, we ensure the
repo's ui object will call the subprocess.wait() method to ensure the top-level
hg process doesn't exit until all background processes have also done so.
Currently, in the tests, most operation spawning background process as followed
by commands waiting for these operations to complete. However this waiting is
racy. First because it seems like we can start waiting before the background
operation actually start, in which case it is prematurely detected as "done".
Second, because some commands may spawn multiple background operation for the
same operation (eg: rebase can apparently trigger multiple prefetch). The
current approach could be updated to maybe handle the first issue, but the
second one will never be properly handled.
In most case, we do not care that the bg process keep running after the command
end. (Since we explicitly wait for them to end before doing anything else). So
we add an option to wait on the background process before exiting the command.
We'll put it in use in the next changeset.
Differential Revision: https://phab.mercurial-scm.org/D7585