Martin von Zweigbergk <martinvonz@google.com> [Wed, 26 Sep 2018 23:09:28 -0700] rev 39959
repo: move unfiltered-repo optimization to workingctx
localrepo.__getitem__ special-cased lookup of the working copy parent
to avoid looking up obsmarkers. I think the reason for that code
(which I once wrote myself) was to make `hg commit` not load
obsmarkers, which it would otherwise do via ctx.p1() in
localrepo.commitctx().
That had the somewhat unfortunate consequence of making lookup of an
unrelated binary nodeid load the dirstate. Now that changectx's
constructor is dumb, we can let workingctx._parents() have the
opmtimization instead.
This affects two tests, because they no longer end up loading the
dirstate and their "warning: ignoring unknown working parent ..."
messages therefore go way.
Differential Revision: https://phab.mercurial-scm.org/D4828
Martin von Zweigbergk <martinvonz@google.com> [Wed, 26 Sep 2018 22:53:14 -0700] rev 39958
context: move logic from changectx.__init__ to localrepo.__getitem__ (API)
My motivation for this change was to make repo[node] not load the
dirstate (more about that in the next patch), but I think it makes
more sense this way too. For example, raising RepoLookupError seems to
belong better in the repo lookup function
(i.e. localrepo.__getitem__).
This makes the changectx constructor very simple -- it just assigns
the given repo, revnum, and nodeid to properties.
Differential Revision: https://phab.mercurial-scm.org/D4827
Martin von Zweigbergk <martinvonz@google.com> [Wed, 26 Sep 2018 22:44:51 -0700] rev 39957
context: reduce dependence of changectx constructor
I want to change the constructor's signature and letting all creation
of changectx instances go through the repo simplifies that.
Differential Revision: https://phab.mercurial-scm.org/D4826
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 01 Oct 2018 23:11:07 -0700] rev 39956
py3: use system strings for HTTP response header comparison
res.headers is holding system strings. Attempting to compare against
bytes always fails and we fail to print decoded CBOR responses on
Python 3.
After this change, various test-wireproto* tests are now properly
printing CBOR response objects.
Differential Revision: https://phab.mercurial-scm.org/D4835
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 01 Oct 2018 23:08:04 -0700] rev 39955
py3: convert HTTP request headers to str
The low-level request object ideally takes system strings for
HTTP request headers and values. If we send in bytes, it works. But
a duplicate header check fails and various tests emit duplicate
user-agent headers.
Differential Revision: https://phab.mercurial-scm.org/D4834
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 01 Oct 2018 23:12:42 -0700] rev 39954
py3: use system strings in HTTP server code
Previously the source transformer was converting some string literals
to bytes and we were comparing a system native string to bytes
and this was leading to sending the wrong HTTP response headers on
Python 3.
After this change, we now properly send Transfer-Encoding and
Connection response headers on Python 3.
Differential Revision: https://phab.mercurial-scm.org/D4833
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 01 Oct 2018 23:39:49 -0700] rev 39953
py3: byteify test-storage.py
The test now passed on Python 3.
# skip-blame just b'' prefixes
Differential Revision: https://phab.mercurial-scm.org/D4836
Pulkit Goyal <pulkit@yandex-team.ru> [Tue, 02 Oct 2018 14:29:56 +0300] rev 39952
narrow: remove narrowpatch instead of narrowcopies
84092edd5c88 removed narrowpatch.py and wanted to drop narrowpatch from
__init__.py but mistakenly removed narrowcopies.
This will make buildbots green again.
Differential Revision: https://phab.mercurial-scm.org/D4837