Martin von Zweigbergk <martinvonz@google.com> [Sun, 18 Mar 2018 22:26:23 -0700] rev 37033
tests: add some more tests to test-rebase-collapse.t
Some of these are currently broken.
Differential Revision: https://phab.mercurial-scm.org/D2911
Martin von Zweigbergk <martinvonz@google.com> [Sun, 18 Mar 2018 15:25:23 -0700] rev 37032
tests: use drawdag in test-rebase-collapse.t
This makes the tests shorter (410 lines -> 240 lines), faster (17s ->
12s), and easier to read (the setup for each test case is just before
the test, and we can refer to commits by name).
Differential Revision: https://phab.mercurial-scm.org/D2910
Martin von Zweigbergk <martinvonz@google.com> [Tue, 20 Mar 2018 17:25:16 -0700] rev 37031
rebase: remove unused default argument values from conclude[memory]node()
It's only "commitmsg" that we don't always pass.
Differential Revision: https://phab.mercurial-scm.org/D2909
Martin von Zweigbergk <martinvonz@google.com> [Tue, 20 Mar 2018 17:30:08 -0700] rev 37030
rebase: get "inmemory" state directly from rebase runtime
As far as I can tell, rbsrt.inmemory is equivalent to
rbsrt.wctx.isinmemory(), so let's use the shorter form.
Differential Revision: https://phab.mercurial-scm.org/D2908
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 25 Dec 2017 15:56:07 +0530] rev 37029
commands: use keyword arguments in update function
This will help us in having a dictionary with the values of all the arguments
and we can add more flags without adding an argument to the function.
Differential Revision: https://phab.mercurial-scm.org/D2896
Martin von Zweigbergk <martinvonz@google.com> [Tue, 20 Mar 2018 13:53:02 -0700] rev 37028
rebase: pass "inmemory" directly to _definedestmap()
We no longer reassign rbsrt.inmemory in _definedestmap(), so we don't
need to pass the whole rebase runtime instance anymore, thus
making it clear that it won't be updated.
Differential Revision: https://phab.mercurial-scm.org/D2905
Anton Shestakov <av6@dwimlabs.net> [Tue, 20 Mar 2018 14:19:28 +0800] rev 37027
hgweb: explain instabilities of unstable changesets (the rest of the themes)
Matt Harbison <matt_harbison@yahoo.com> [Tue, 20 Mar 2018 21:10:29 -0400] rev 37026
test-merge-tools: stabilize for Windows
See fe5c4b795999.
Matt Harbison <matt_harbison@yahoo.com> [Tue, 20 Mar 2018 20:33:37 -0400] rev 37025
test-http-protocol: drop an extraneous glob for Windows
Martin von Zweigbergk <martinvonz@google.com> [Mon, 19 Mar 2018 08:07:18 -0700] rev 37024
merge with stable
Yuya Nishihara <yuya@tcha.org> [Sun, 03 Apr 2016 14:16:47 +0900] rev 37023
hgweb: evaluate the "default" value as template
Strictly speaking, everything in the map file is a template. So let's not
take out an unparsed template string.
Yuya Nishihara <yuya@tcha.org> [Fri, 16 Mar 2018 21:39:32 +0900] rev 37022
templater: use named function to expand template against mapping dict (API)
And replace __call__(t, **mapping) in favor of generate(t, mapping). I prefer
a named function here since the templater isn't a simple function-like object.
.. api::
The templater is no longer callable. Use ``templater.generate(t, mapping)``
instead of ``templater(t, **pycompat.strkwargs(mapping))``.
Yuya Nishihara <yuya@tcha.org> [Mon, 19 Mar 2018 21:09:23 +0900] rev 37021
highlight: peek Content-Type header set by hgweb
There should be no need to re-render the mimetype template since it's set
before dispatching webcommands.
Anton Shestakov <av6@dwimlabs.net> [Tue, 20 Mar 2018 14:12:05 +0800] rev 37020
obsolete: add a note that explains creating aliases for marker flags
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 04 Mar 2018 10:34:09 -0500] rev 37019
repair: rename _backup to backupbundle
A future commit will introduce a caller from outside the module.
The function should have already been public because histedit was
calling it.
Differential Revision: https://phab.mercurial-scm.org/D2666
Yuya Nishihara <yuya@tcha.org> [Mon, 19 Mar 2018 22:10:40 +0900] rev 37018
templatefuncs: do not stringify result of if*() expression
Returning a generator means that the result is a byte string. I can't find
any reason to make the "if" condition lazy since it is evaluated anyway
when {if()} has to be evaluated. So let's simply make if*() return an input
expression unmodified.
Yuya Nishihara <yuya@tcha.org> [Mon, 19 Mar 2018 21:55:02 +0900] rev 37017
templater: add brief doc about internal data types
Hopefully this will help reviewing upcoming my series. Start small.
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 13 Mar 2018 11:17:10 -0700] rev 37016
debugcommands: support sending HTTP requests with debugwireproto
We implement an action that can issue an HTTP request. We can define
headers via arguments and specify a file to use for the HTTP request
body.
The request uses the HTTP peer's opener, which is already configured
for auth, etc. This is both good and bad. Good in that we get some
nice behavior out of the box. Bad in that some HTTP request headers
are added automatically.
Differential Revision: https://phab.mercurial-scm.org/D2841
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 13 Mar 2018 10:02:03 -0700] rev 37015
debugcommands: support connecting to HTTP peers
Now that we have the plumbing for logging socket activity, let's hook
it up to `hg debugwireproto` so we can collect low-level activity on
sockets.
The new code is a bit incomplete. But it is better than nothing:
`hg debugwireproto` is still heavily evolving.
The added test demonstrates some interesting behavior. For example,
we're calling socket.makefile() and doing I/O on that. TIL. We're also
sending an "Accept-Encoding: identity" request header.
Differential Revision: https://phab.mercurial-scm.org/D2726
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 12 Mar 2018 15:43:36 -0700] rev 37014
url: add HTTP handler that uses a proxied socket
Now that we have a socket proxy that can log I/O, we need to teach
mechanisms that open URLs how to use it.
We invent a custom HTTP handler class that knows how to proxy
sockets as soon as they are opened. We teach the high-level
opener() to accept logging arguments so a logging HTTP handler
can be constructed.
We don't yet support intercepting HTTPS sockets because I
don't want to go down that rabbit hole.
For the record, the urllib API is crazy and it took way too long
to figure out at what levels I needed to plug in to modify
the socket.
# no-check-commit because we must name http_open that way
Differential Revision: https://phab.mercurial-scm.org/D2722
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 13 Mar 2018 17:42:00 -0700] rev 37013
util: observable proxy objects for sockets
We previously introduced proxy objects and observers for file objects
to help implement low-level tests for the SSH wire protocol.
In this commit, we do the same for sockets in order to help test the
HTTP server.
We only proxy/observe some socket methods. I didn't feel like
implementing all the methods because there are so many of them and
implementing them will provide no short term value. We can always
implement them later.
# no-check-commit because we implement foo_bar methods on stdlib types
Differential Revision: https://phab.mercurial-scm.org/D2721
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 13 Mar 2018 09:45:56 -0700] rev 37012
hgweb: allow defining Server response header for HTTP server
By default, the string contains the Python version. Server
operators may want to change this.
Because we like deterministic tests, we change the test harness
to always set this value to a known string. Various globs over
the server header have now been removed.
# no-check-commit because we add version_string()
Differential Revision: https://phab.mercurial-scm.org/D2840
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 13 Mar 2018 08:58:52 -0700] rev 37011
tests: use $HTTP_DATE$ for Date header
Support for the $HTTP_DATE$ substitution was recently added. Let's
adopt it more widely.
We had to tweak the substitution to be case insensitive, since
HTTP headers are case insensitive. I also found a minor test
issue not globbing over the length of the Server response header.
Differential Revision: https://phab.mercurial-scm.org/D2839
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 12 Mar 2018 15:49:02 -0700] rev 37010
debugcommands: introduce actions to perform deterministic reads
"readavailable" is useful as a debugging device to see what data is
available on a pipe. But the mechanism isn't deterministic because
what's available on a pipe is highly conditional on timing, system
load, OS behavior, etc. This makes it not suitable for tests.
We introduce "ereadline," "read," and "eread" for performing
deterministic I/O operations (at least on blocking file descriptors).
We stop short of converting existing consumers of "readavailable"
in tests because we're working out race conditions and deadlocks
on Windows. But the goal is to eventually move tests away from
"readavailable" to these new APIs.
Differential Revision: https://phab.mercurial-scm.org/D2720
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 07 Mar 2018 20:41:59 -0800] rev 37009
httppeer: refactor how httppeer is created (API)
Previously, we passed a bunch of arguments to httppeer.__init__,
validated them, then possibly constructed a valid instance.
A short while ago, we refactored sshpeer so all the validation and
setup work occurs before the constructor. We introduced a makepeer()
to hold most of this logic.
This commit gives httppeer the same treatment.
As a sign that the previous design was poor, __del__ no longer
conditionally checks for the presence of an attribute that may
not be defined (it is always defined in the new code).
.. api::
httppeer.httppeer.__init__ now takes additional arguments.
Instances should be obtained by calling httppeer.instance()
or httppeer.makepeer() instead.
Differential Revision: https://phab.mercurial-scm.org/D2725
Boris Feld <boris.feld@octobus.net> [Wed, 31 Jan 2018 09:41:47 +0100] rev 37008
bundle: condition the changegroup part when creating a new bundle
We will generate stream bundle in the next changesets which doesn't need the
changegroup part.
Differential Revision: https://phab.mercurial-scm.org/D1951
Boris Feld <boris.feld@octobus.net> [Fri, 19 Jan 2018 17:29:50 +0100] rev 37007
stack: return a sorted smartrev by default
Most stack customers will display a list of revisions, sort it by default.
Differential Revision: https://phab.mercurial-scm.org/D2399
Boris Feld <boris.feld@octobus.net> [Fri, 19 Jan 2018 17:09:24 +0100] rev 37006
histedit: use the new stack definition for histedit
Now that we have a common stack definition, use it in the hg histedit command.
Differential Revision: https://phab.mercurial-scm.org/D2398
Boris Feld <boris.feld@octobus.net> [Fri, 19 Jan 2018 16:52:56 +0100] rev 37005
show: use the new stack definition for show stack
Now that we have a common stack definition, use it in the hg show stack
command.
Differential Revision: https://phab.mercurial-scm.org/D2397
Boris Feld <boris.feld@octobus.net> [Fri, 19 Jan 2018 16:52:02 +0100] rev 37004
stack: import Evolve stack test file
Import Evolve stack test file for starting to have good coverage on stack
definition.
Differential Revision: https://phab.mercurial-scm.org/D2396