wireproto: allow wire protocol commands to declare transport support
Currently, wire protocol commands are exposed on all transports.
Some wire protocol commands are only supported or sensical on some
transports. In the future, new wire protocol commands may only be
available on new transports and legacy wire protocol commands may
not be available to newer transports.
This commit introduces a mechanism to allow @wireprotocommand to
declare transports for which they should not be available. The
mechanism for determining if a wire protocol command is available
for a given transport instance has been taught to take this knowledge
into account.
To help implement this feature, we add a dict to wireprototypes
declaring all wire transports and their metadata. There's probably
room to refactor the constants used to identify the wire protocols.
But that can be in another commit.
Differential Revision: https://phab.mercurial-scm.org/D2483
sshpeer: don't read from stderr when that behavior is disabled
We previously prevented the creation of doublepipe instances when
we're not supposed to automatically read from stderr. However,
there were other automatic calls to read from stderr that were
undermining this effort.
This commit prevents all automatic reads from stderr from occurring
when they are supposed to be disabled.
Because stderr is no longer being read, we need to call "readavailable"
from tests so stderr is read from.
Test output changes because stderr is now always (manually) read after
stdout. And, since sshpeer no longer automatically tends to stderr,
no "remote: " messages are printed. This should fix non-deterministic
test output.
FWIW, doublepipe automatically reads from stderr when reading from
stdout, so I'm not sure some of these calls to self._readerr() are
even needed.
Differential Revision: https://phab.mercurial-scm.org/D2571
util: extract all date-related utils in utils/dateutil module
With this commit, util.py lose 262 lines
Note for extensions author, if this commit breaks your extension, you can pull
the step-by-step split here to help you more easily pinpoint the renaming that
broke your extension:
hg pull https://bitbucket.org/octobus/mercurial-devel/ -r
ac1f6453010d
Differential Revision: https://phab.mercurial-scm.org/D2282
clone: updates the help text for hg clone -{r,b} (
issue5654)
Differential Revision: https://phab.mercurial-scm.org/D2095