Gregory Szorc <gregory.szorc@gmail.com> [Tue, 28 Aug 2018 15:41:09 -0700] rev 39450
wireprotov2peer: use our CBOR decoder
Behavior should be the same in order to preserve backwards
compatibility. We obviously want to stream values in this code.
We'll do that in subsequent commits.
Differential Revision: https://phab.mercurial-scm.org/D4470
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 28 Aug 2018 15:37:55 -0700] rev 39449
debugcommands: use our CBOR decoder
It implements the set of CBOR needed for the wire protocol.
Differential Revision: https://phab.mercurial-scm.org/D4469
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 28 Aug 2018 18:12:04 -0700] rev 39448
wireprotov2server: use our CBOR encoder
Again, test output changed slightly because of map key ordering
differences. This shouldn't matter.
I could have called oncommandresponsereadygen() with the raw output
from the stream encoder. However, this changed test output further.
I left a TODO to follow up on that later.
Differential Revision: https://phab.mercurial-scm.org/D4468
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 28 Aug 2018 18:05:48 -0700] rev 39447
wireprotoserver: use our CBOR encoder
Moving away from the vendored package.
Again, our encoder normalizes keys differently from the vendored
package (for now), hence the test changes.
Differential Revision: https://phab.mercurial-scm.org/D4467
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 28 Aug 2018 18:05:08 -0700] rev 39446
wireprotoframing: use our CBOR module
Tests changed because our CBOR encoder appears to sort map keys
differently from the vendored CBOR package. The CBOR specification
does define canonical sorting rules for keys based on the
byte values. I'm guessing our implementation doesn't follow them.
But our encoder doesn't guarantee that it conforms with the canonical
specification. Right now, we just care that output is deterministic.
And our encoder does guarantee that.
Differential Revision: https://phab.mercurial-scm.org/D4466
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 28 Aug 2018 15:10:56 -0700] rev 39445
httppeer: use our CBOR decoder
We just implemented our own CBOR decoder. Let's use it in
httppeer.
Differential Revision: https://phab.mercurial-scm.org/D4465
Anton Shestakov <av6@dwimlabs.net> [Wed, 22 Aug 2018 09:02:07 +0800] rev 39444
zsh_completion: complete shelve and unshelve
Differential Revision: https://phab.mercurial-scm.org/D4428
Anton Shestakov <av6@dwimlabs.net> [Tue, 21 Aug 2018 20:30:53 +0800] rev 39443
zsh_completion: use revsets to exclude this rev from suggestions to hg merge
One of the most important aspects of a completion system is its speed, so 1
call to hg is definitely better than 4.
Sorting by rev (descending) is to preserve the same order as in `hg heads`
output.
While at it, declare branches as an array too.
Differential Revision: https://phab.mercurial-scm.org/D4426
Martin von Zweigbergk <martinvonz@google.com> [Tue, 04 Sep 2018 10:36:34 -0700] rev 39442
drawdag: correctly pass repo to super constructor
This was caught by someone who was looking for the
super(cls, self).__init__(self, ...)
pattern in all code in our Google-internal repo.
Differential Revision: https://phab.mercurial-scm.org/D4464
Matt Harbison <matt_harbison@yahoo.com> [Tue, 04 Sep 2018 20:54:41 -0400] rev 39441
help: correct a typo in tweakdefaults
Pulkit Goyal <pulkit@yandex-team.ru> [Mon, 06 Aug 2018 14:06:19 +0300] rev 39440
narrow: add '--import-rules' flag to tracked command
This patch adds a `--import-rules` flag to tracked command provided by narrow
extension. Using the --import-rules flag, you can pass a filename from which
narrowspecs should be read and added to main narrowspec.
A lot of times, in automation or manually also, when you are working with big
repo, specifying each path name on commandline using '--addinclude' and
'--addexclude' is tedious and something which can scale. So we needed something
where we can pass a file to extend the narrowspecs.
Nice thing about this is that the automations which reads some file to change
the sparse profile, can now read the same file for changing narrowspecs too.
Tests are added for the new feature.
Differential Revision: https://phab.mercurial-scm.org/D4125
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 23 Aug 2018 13:11:13 -0700] rev 39439
internals: extract wire protocol version 2 commands to standalone doc
wireprotocol.txt is a bit long and unwieldy. I think splitting it up
will help aid comprehension.
Let's start by extracting wire protocol version 2 commands to a
standalone document.
As part of the port, I munged with the section titles a bit and
expanded the TODO around node namespaces.
Differential Revision: https://phab.mercurial-scm.org/D4442
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 23 Aug 2018 13:46:39 -0700] rev 39438
wireprotov2peer: split responsedata handling into separate function
So we don't have so much logic inside an if/elif block.
Differential Revision: https://phab.mercurial-scm.org/D4439
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 22 Aug 2018 10:25:47 -0700] rev 39437
httppeer: add TODO about delayed handling of ^C
When testing wire protocol v2 with large responses, I noticed that
^C doesn't result in immediate termination. I'm not sure what the
root cause is. Let's add a TODO so we don't forget about it.
Differential Revision: https://phab.mercurial-scm.org/D4438
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 31 Aug 2018 08:57:14 -0700] rev 39436
httppeer: log commands for version 2 peer
This will aid testing and debugging.
Differential Revision: https://phab.mercurial-scm.org/D4437
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 22 Aug 2018 10:29:30 -0700] rev 39435
wireprotov2peer: add TODO about streaming responses
This is a pretty big deficiency in the current implementation.
We don't want to forget about this.
Differential Revision: https://phab.mercurial-scm.org/D4435
Augie Fackler <augie@google.com> [Tue, 04 Sep 2018 12:36:33 -0400] rev 39434
tests: update relnotes test for actual output
I'm unclear why I didn't see this before but I consistently see it
now. In any event, it doesn't appear to be a regression, so let's just
bake it into the test.
Differential Revision: https://phab.mercurial-scm.org/D4463
Pulkit Goyal <pulkit@yandex-team.ru> [Tue, 04 Sep 2018 17:57:49 +0300] rev 39433
py3: use print as a function in tests/test-hgweb.t
Differential Revision: https://phab.mercurial-scm.org/D4461
Pulkit Goyal <pulkit@yandex-team.ru> [Tue, 04 Sep 2018 17:58:39 +0300] rev 39432
py3: bytestr a bytes val to make sure we get bytechr while iterating
Differential Revision: https://phab.mercurial-scm.org/D4460
Pulkit Goyal <pulkit@yandex-team.ru> [Tue, 04 Sep 2018 17:53:54 +0300] rev 39431
py3: make regexes in hgext/keyword.py bytes
# skip-blame because just b'' prefixes
Differential Revision: https://phab.mercurial-scm.org/D4459
Pulkit Goyal <pulkit@yandex-team.ru> [Tue, 04 Sep 2018 17:33:59 +0300] rev 39430
py3: add more missing b'' prefixes in test files
# skip-blame because just b'' prefixes
Differential Revision: https://phab.mercurial-scm.org/D4458
Pulkit Goyal <pulkit@yandex-team.ru> [Tue, 04 Sep 2018 17:33:22 +0300] rev 39429
py3: write the file in str mode in tests/test-rename-merge2.t
This is better then converting the value the value of sys.argv to bytes.
This makes the test pass on Python 3.
Differential Revision: https://phab.mercurial-scm.org/D4457
Pulkit Goyal <pulkit@yandex-team.ru> [Tue, 04 Sep 2018 17:32:09 +0300] rev 39428
py3: add missing b'' prefixes in tests/badserverext.py
# skip-blame because just b'' prefixes
Differential Revision: https://phab.mercurial-scm.org/D4456
Pulkit Goyal <pulkit@yandex-team.ru> [Tue, 04 Sep 2018 17:19:30 +0300] rev 39427
py3: handle keyword arguments correctly in hgext/acl.py
The keys of keyword arguments on python 3 should be str, so when we try to get
some key from them, we must make sure we are using str.
# skip-blame because just b'' prefix
Differential Revision: https://phab.mercurial-scm.org/D4455
Pulkit Goyal <pulkit@yandex-team.ru> [Tue, 04 Sep 2018 17:16:29 +0300] rev 39426
py3: don't return the revid as unicode in hgext/convert/subversion.py
I tried digging why u'' was added in first place, and I was unable to found
something relevant. This might be because some API's takes unicodes, I am not
sure.
Differential Revision: https://phab.mercurial-scm.org/D4454
Pulkit Goyal <pulkit@yandex-team.ru> [Tue, 04 Sep 2018 17:15:17 +0300] rev 39425
py3: make sure we pass str in os.sysconf in hgext/convert/common.py
# skip-blame because just r'' prefix
Differential Revision: https://phab.mercurial-scm.org/D4453
Yuya Nishihara <yuya@tcha.org> [Wed, 05 Sep 2018 21:49:44 +0900] rev 39424
manifest: fix leak on error return from lazymanifest_filtercopy()
Spotted by ASAN.
free(copy->lines) and Py_DECREF(copy->pydata) are replaced by Py_XDECREF(copy),
which should call lazymanifest_dealloc(). Freeing half-initialized copy->lines
is safe since copy->numlines holds a valid value.
Yuya Nishihara <yuya@tcha.org> [Wed, 05 Sep 2018 21:46:53 +0900] rev 39423
manifest: incref/decref copy->pydata to clarify 'copy' holds a reference
Yuya Nishihara <yuya@tcha.org> [Wed, 05 Sep 2018 20:52:22 +0900] rev 39422
dirstate: use tuple interface to fix leak in pack_dirstate()
Spotted by ASAN.
Unlike PyTuple_GET_ITEM(), PySequence_ITEM() returns a new reference. This
bug could be fixed by inserting Py_CLEAR() and Py_XDECREF() appropriately,
but I think requiring a tuple object is simpler and less error-prone.
The cext version is jumped to 10 since 6..9 are used in the default branch.
We'll need to bump it again at merge.
Yuya Nishihara <yuya@tcha.org> [Wed, 05 Sep 2018 22:10:41 +0900] rev 39421
xdiff: fix leak in hunk_consumer()
Spotted by ASAN.
Since PyList_Append() does not "steal" a reference, Py_DECREF() is always
required. Perhaps, this is the largest leak in this series.