graft: do not try to skip rev derived from ancestor more than once (
issue6024)
We check 'x in revs' in other cases, so let's do the same.
The test case credits to Tom Prince.
subrepo: print the status line before creating the peer for better diagnostics
I ran into a problem where I tried updating to a different branch, and the
process appeared to hang. It turned out that the subrepo revision wasn't
available locally, and I must have originally cloned it from an `hg serve -S` on
a machine that currently wasn't serving anything. It took 2+ minutes to
timeout, and didn't mention what it was connecting to even then.
There are a couple of other issues in this scenario too.
- The repo is dirty after the failed checkout because the top level repo is
updated first. We should probably make 2 passes- top down to pull
everything needed, and then do an update once everything is in place.
- Something must be reading .hgsubstate from wdir because if the same merge
command is run after the timeout, a prompt is issued that the local and
remote subrepo diverged, instead of hanging. But it lists the local version
and remote version as having the same hash.
sparse-revlog: use `span` variable as intended
The variable was planned to be used in the while condition but was not used
yet.
tests: stabilize test-commandserver.t on Windows
It looks like new test coverage in
054d0fcba2c4, rather than a code change.
histedit: conditionalize the imports of 'fcntl' and 'termios'
The recent import of chistedit in
c36175456350 made Windows sad. I'm not sure
if there's other stuff that needs to be done here (e.g. change the default
interface), but this makes the tests run again.
It would have been nicer if the error message indicated these modules were the
problem, but instead it said "*** failed to import extension histedit: No module
named histedit". I'm not sure if there's anything we can do about that.
logtoprocess: update commandfinish options arguments
d2c997b8001f changed the logtoprocess API with the effect of not exposing the
positional arguments to the logtoprocess scripts anymore.
We have some scripts that use the duration and return code of the
"commandfinish" event to monitor hg calls. Update the logging of the
"commandfinish" to expose those values as options argument, which will be
accessible as `OPT_RETURN_CODE` and `OPT_DURATION` in logtoprocess arguments.
The code has been formatted with Black.
Differential Revision: https://phab.mercurial-scm.org/D5282
rebase: fix two ui.logs to actually have text when using default blackbox log
Some implementations of ui.log record structured information along with the
ui.log which can be used for metrics, but ui.log() as implemented by the
blackbox logging does not do anything special with this, and we end up with a
log line with no text (not even a line break) so it ends up looking something
like:
date time user @node (pid) [rebase]> date time user @node (pid) ...
Differential Revision: https://phab.mercurial-scm.org/D5279
wireprotov2server: let repo.narrowmatch(match) do matcher intersection
This is supported since
4fd0fac48922 (localrepo: allow narrowmatch()
to accept matcher to intersect with, 2018-09-28).
Differential Revision: https://phab.mercurial-scm.org/D5281