Kyle Lippincott <spectral@google.com> [Mon, 28 Jan 2019 18:00:14 -0800] rev 41454
patch: handle 0 context lines (diff.unified=0) when parsing patches
Previously, if there were no context lines, we would just keep updating the
ranges and the hunk, but not actually storing the hunk (just overwriting it each
time). Thus a diff like this:
$ hg diff --config diff.unified=0
diff --git a/bar b/bar
--- a/bar
+++ b/bar
@@ -1,0 +2,1 @@ 1
+change1
@@ -3,0 +5,1 @@ 3
+change2
would come out of the parser like this (change1 is lost):
bar:
@@ -3,0 +5,1 @@ 3
+change2
This had some really weird side effects for things like commit --interactive,
split, etc.
Differential Revision: https://phab.mercurial-scm.org/D5743
Pulkit Goyal <pulkit@yandex-team.ru> [Wed, 30 Jan 2019 03:56:35 +0530] rev 41453
py3: pass str into RuntimeError() to prevent b'' in output
# skip-blame as just r'' prefixes
Differential Revision: https://phab.mercurial-scm.org/D5740
Pulkit Goyal <pulkit@yandex-team.ru> [Wed, 30 Jan 2019 03:49:56 +0530] rev 41452
py3: use '%d' instead of '%s' for integers
Differential Revision: https://phab.mercurial-scm.org/D5738
Augie Fackler <augie@google.com> [Tue, 29 Jan 2019 13:26:18 -0500] rev 41451
tests: port test-hgweb-auth.py to Python 3
Differential Revision: https://phab.mercurial-scm.org/D5736
Augie Fackler <augie@google.com> [Tue, 29 Jan 2019 13:25:21 -0500] rev 41450
url: convert some variables back to bytes
Differential Revision: https://phab.mercurial-scm.org/D5735
Augie Fackler <augie@google.com> [Tue, 29 Jan 2019 13:24:20 -0500] rev 41449
url: add some defensive asserts on expected incoming types
Our type handling is a nightmare here, and we're loading passwords to
do network IO, so we can afford to be potentially-slow but pedantic
here.
Differential Revision: https://phab.mercurial-scm.org/D5734
Pulkit Goyal <pulkit@yandex-team.ru> [Tue, 29 Jan 2019 16:03:52 +0300] rev 41448
changegroup: don't try to build changelog chunks if not required
When we extend a narrow clone without ellipsis, we don't download changelog
information because that's already present with the client. However we still try
to build that chunk stream. Building that chunk stream involves calling a lookup
function and store.emitrevisions() API. The lookup function is called len(cl)
number of times.
On large repositories, where len(cl) is in millions, calling that lookup
function is not a good idea. Also it's not required to use the
store.emitrevisons() API because we already have nodes present which we can use.
This patch short-circuits state building logic if we are processing a
non-ellipsis case and changelog is not required.
This saves up ~20 seconds on our internal repo for a single extend call.
Differential Revision: https://phab.mercurial-scm.org/D5733
Boris Feld <boris.feld@octobus.net> [Thu, 24 Jan 2019 18:22:47 -0500] rev 41447
revlog: make sure we never use sparserevlog without general delta (
issue6056)
We are getting user report where the delta code tries to use `sparse-revlog`
logic on repository where `generaldelta` is disabled. This can't work so we
ensure the two booleans have a consistent value.
Creating this kind of repository is not expected to be possible the current bug
report point at a clonebundle related bug that is still to be properly isolated
(Yuya Nishihara seems to a have done it).
Corrupting a repository to reproduce the issue is possible. A test using this
method is included in this fix.
Boris Feld <boris.feld@octobus.net> [Wed, 30 Jan 2019 18:15:38 +0100] rev 41446
sparserevlog: document the config option
This was overlooked when this graduated from experimental.
Pulkit Goyal <pulkit@yandex-team.ru> [Tue, 29 Jan 2019 15:43:02 +0300] rev 41445
changegroup: initialize the state variable a bit earlier
This will make the next patch much easier.
Differential Revision: https://phab.mercurial-scm.org/D5732