Home - Waterfall Grid T-Grid Console Builders Recent Builds Buildslaves Changesources - JSON API - About

Console View

Legend:   Passed Failed Warnings Failed Again Running Exception Offline No data

Gregory Szorc
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
Gregory Szorc
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

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
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
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
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
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
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

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
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
Boris Feld
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
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
stack: import Evolve stack test file

Import Evolve stack test file for starting to have good coverage on stack

Differential Revision: https://phab.mercurial-scm.org/D2396
Boris Feld
show: use the new stack definition for show stack

Now that we have a common stack definition, use it in the hg show stack

Differential Revision: https://phab.mercurial-scm.org/D2397
Boris Feld
stack: add a new module for stack-related commands

Bootstrap the module with a function that returns the stack for the current
revision. The definition of the stack is ihnerited from histedit default
revset and used by hg show stack.

Differential Revision: https://phab.mercurial-scm.org/D2395
Boris Feld
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
Kyle Lippincott
filemerge: move temp file unlinks to _maketempfiles

Differential Revision: https://phab.mercurial-scm.org/D2887
Kyle Lippincott
filemerge: use a single temp dir instead of temp files

This can help to remove the clutter from UIs that display just the filenames;
instead of seeing foo~local.C9ru9r.txt and foo~base.2DMV22.txt (in the /tmp
directory on most platforms), we create a single new directory and use that,
producing filenames like /tmp/hgmerge.C9ru9r/foo~local.txt.

Differential Revision: https://phab.mercurial-scm.org/D2888
Martin von Zweigbergk
rebase: on abort, don't strip commits that didn't need rebased (issue5822)

I clearly missed adding this condition in 78496ac30025 (rebase: allow
rebase even if some revisions need no rebase (BC) (issue5422),
2017-05-11). Perhaps I should have opted for the "revdone" solution I
mentioned there...

Differential Revision: https://phab.mercurial-scm.org/D2879
Martin von Zweigbergk
tests: demonstrate aborted rebase strips commits that didn't need rebasing

I haven't verified, but this has probably been broken ever since I
added the feature in 78496ac30025 (rebase: allow rebase even if some
revisions need no rebase (BC) (issue5422), 2017-05-11).

Differential Revision: https://phab.mercurial-scm.org/D2877
Martin von Zweigbergk
rebase: avoid defining two lists with the same contents

In abort(), there's "dstates" and "rebased" that are identical, which
they seem to have been since 0806823370d8 (rebase: properly calculate
descendant set when aborting (issue3332), 2012-03-22). Let's
de-duplicate. I don't know what "dstates" means, but "rebased" makes
sense (it's the list of rebased revisions), so let's pick that.

Differential Revision: https://phab.mercurial-scm.org/D2878
Gregory Szorc
hgweb: refactor multirequest to be a dict of lists

... instead of a list of 2-tuples.

This makes key lookups faster. The only downside is we lose total
ordering of all entries. But we weren't relying on that before, so
it's no loss.

Differential Revision: https://phab.mercurial-scm.org/D2881
Augie Fackler
tests: stop over-specifying tempfile name

Python 3 has more random characters in the default template, which is fine.

Differential Revision: https://phab.mercurial-scm.org/D2676
Pulkit Goyal
py3: make tests/test-log-linerange.t work on Python 3

Made sure we write bytes to file and we suppress the return value of open().

Differential Revision: https://phab.mercurial-scm.org/D2893
Pulkit Goyal
py3: use print as a function in tests/test-narrow-clone-non-narrow-server.t

Differential Revision: https://phab.mercurial-scm.org/D2892
Pulkit Goyal
py3: use "%d" % int instead of str(int)

We need to use bytes internally.

Differential Revision: https://phab.mercurial-scm.org/D2895
Matt Harbison
wireproto: explicitly flush stdio to prevent stalls on Windows

This is the key to fixing the hangs on Windows in D2720[1].  I put flushes in a
bunch of other places that didn't help, but I suspect that's more a lack of test
coverage than anything else.

Chasing down stuff like this is pretty painful.  I'm wondering if we can put a
proxy around sys.stderr (and sys.stdout?) on Windows (only when daemonized?)
that will flush on every write (or at least every write with a '\n').

[1] https://www.mercurial-scm.org/pipermail/mercurial-devel/2018-March/113352.html
Pulkit Goyal
py3: use pycompat.bytestr() in dirstate.py

This prevents extra b'' prefixes in output.

Differential Revision: https://phab.mercurial-scm.org/D2894
Matt Harbison
test-lfs: glob over some output changes

These changes started with 2090044a288d.  They aren't important to LFS testing.
Yuya Nishihara
templater: factor out helper that renders named template as string

This is quite common in non-web templating, and **kwargs expansion is annoying
because of the unicode-ness of Python3.
Yuya Nishihara
templater: rename .render(mapping) to .renderdefault(mapping) (API)

I'm going to add templ.render(t, mapping) and templ.generate(t, mapping) in
place of stringify(templ(t, **mapping)) and templ(t, **mapping) respectively.

.. api::

  The ``render(mapping)`` method of the templater has been renamed to
Yuya Nishihara
templater: fix invalid reference of runsymbol in doctest

Oversight at da710c3df4dc. I was just lucky that this lambda function is
never evaluated.
Yuya Nishihara
cmdutil: drop redundant import of merge module
Augie Fackler
merge with stable
Yuya Nishihara
templater: process mapping dict by resource callables

A resource item is a callable, so let's make it look up a resource object
by itself.
Yuya Nishihara
annotate: add support for template keywords and functions depending on ctx
Yuya Nishihara
templater: convert resources to a table of callables for future extension

I'm going to add a full templating support to the annotate command. As the
annotate is a filectx-oriented command, we'll  need a way to look up a ctx
from a bounded fctx only when necessary.

This is the minimal change to support that. I'm thinking of defining a proper
interface to look up template resources to fix other issues, but that isn't
ready yet.

(Changes from V1: just updated tests and patch descriptions.)
Yuya Nishihara
formatter: unblock storing fctx as a template resource

To keep templateformatter._renderitem() simple, a repo instance is looked
through ctx if available. This is probably good for future subrepo support
where ctx.repo() may be different from the global repo.
Martin von Zweigbergk
rebase: allow in-memory merge of the working copy parent

Before this patch and when the rebase involved the working copy parent
(and thus the working copy too), we would not do in-memory rebase even
if requested to. The in-code comment explains that the reason had
something to do with avoiding an extra update, but I don't know which
update that refers to. Perhaps an earlier version of the code used to
update to the destination before rebasing even if in-memory rebase was
requested? That seems to not be done at least since aa660c1203a9
(rebase: do not bail on uncomitted changes if rebasing in-memory,

To see if this still made it slower, I create a single tiny commit on
top of one branch of the mozilla-unified repo (commit a1098c82 to be
exact) and rebased it to another branch (commit d4e9a7be). Before this
patch that took 11.8s and after this patch it took 8.6s (I only did
two runs each, but the timings were very consistent).

Differential Revision: https://phab.mercurial-scm.org/D2876
Gregory Szorc
hgweb: convert an assert to a ProgrammingError

Because assert may get optimized away.

Differential Revision: https://phab.mercurial-scm.org/D2882
Kyle Lippincott
filemerge: give some variables in _xmerge more descriptive names

Differential Revision: https://phab.mercurial-scm.org/D2886
Boris Feld
util: clear debugstacktrace call

During the renaming of datestr, it seems that I have forget a debugstacktrace
in util.py. Remove it.

Differential Revision: https://phab.mercurial-scm.org/D2838