Pulkit Goyal <pulkit@yandex-team.ru> [Fri, 28 Sep 2018 19:18:17 +0300] rev 39961
narrow: factor out logic to create cg while widening into separate fn
This patch takes out the logic which generates a changegroup for widening a
narrow clone when ellipses are disabled. This is done because future patches
will introduce a narrow_widen() wireprotocol command which will send a
bundle2 with changegroup and will use this function.
The new function for now returns just the changegroup for compatibility with
existing code, but in future patches, when we establish a wireprotocol command
and call this function from there, this will return the required bundle2.
Differential Revision: https://phab.mercurial-scm.org/D4786
Martin von Zweigbergk <martinvonz@google.com> [Mon, 01 Oct 2018 15:29:31 -0700] rev 39960
narrow: avoid looking up dirstate again when editing dirstate
The narrow extension overrides the dirstate editing functions to
restrict paths outside the narrowspec. These overrides access the
dirstate from repo.dirstate instead of using the "self" reference
passed to the overridden functions. I don't see a reason for this and
it caused me problems with a later patch (it caused infinite recursion
when I modified localrepo.dirstate()), so let's change it.
Differential Revision: https://phab.mercurial-scm.org/D4829
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
Matt Harbison <matt_harbison@yahoo.com> [Mon, 01 Oct 2018 23:26:24 -0400] rev 39951
py3: suppress the output from .write() calls in more tests
I missed these in
803b7569c9ea because I forgot about `...` lines.
Matt Harbison <matt_harbison@yahoo.com> [Mon, 01 Oct 2018 23:07:19 -0400] rev 39950
py3: byteify test-lfs.t
Matt Harbison <matt_harbison@yahoo.com> [Mon, 01 Oct 2018 23:04:58 -0400] rev 39949
lfs: explicitly name a key when sorting blob pointers
This is needed to keep py3 happy. The other two instances of sorting already
did this.
Matt Harbison <matt_harbison@yahoo.com> [Mon, 01 Oct 2018 21:54:00 -0400] rev 39948
py3: byteify test-lock.py
There's still a stacktrace about not being able to serialize _io.TextIOWrapper.
Matt Harbison <matt_harbison@yahoo.com> [Mon, 01 Oct 2018 21:48:45 -0400] rev 39947
py3: byteify contrib/dumprevlog
Matt Harbison <matt_harbison@yahoo.com> [Mon, 01 Oct 2018 19:39:05 -0400] rev 39946
py3: quote $PYTHON in test-merge-symlinks.t
Martin von Zweigbergk <martinvonz@google.com> [Thu, 21 Jun 2018 22:07:34 -0700] rev 39945
copies: inline a variable that's used only once
By inlining it, we also avoid calculating the value when "if of in
seen" is false (probably not significant).
Differential Revision: https://phab.mercurial-scm.org/D4831
Martin von Zweigbergk <martinvonz@google.com> [Sat, 15 Sep 2018 22:56:57 -0700] rev 39944
bundlerepo: remove a variable alias
"parentrepo" and "repo" were the same thing and I don't see much
reason for it (unionrepo has similar structure and a similar alias but
there are two repos there so at least it makes a little more sense
there).
Differential Revision: https://phab.mercurial-scm.org/D4830
Augie Fackler <augie@google.com> [Mon, 01 Oct 2018 16:11:48 -0400] rev 39943
merge with stable
Augie Fackler <raf@durin42.com> [Mon, 01 Oct 2018 16:07:38 -0400] rev 39942
Added signature for changeset
5405cb1a7901
Augie Fackler <raf@durin42.com> [Mon, 01 Oct 2018 16:07:36 -0400] rev 39941
Added tag 4.7.2 for changeset
5405cb1a7901
Yuya Nishihara <yuya@tcha.org> [Wed, 05 Sep 2018 21:23:29 +0900] rev 39940
manifest: fix out-of-bounds read of corrupted manifest entry
Spotted by ASAN.
Yuya Nishihara <yuya@tcha.org> [Wed, 05 Sep 2018 21:32:45 +0900] rev 39939
manifest: rewrite pathlen() to not cross entry boundary
Even though the entire manifest data should be terminated by '\0', it seems
not nice to scan '\0' over the entry terminator, '\n'.
Martin von Zweigbergk <martinvonz@google.com> [Fri, 28 Sep 2018 12:05:48 -0700] rev 39938
narrow: move support for `hg verify` into core
Differential Revision: https://phab.mercurial-scm.org/D4824