Tue, 04 Sep 2018 10:36:34 -0700 drawdag: correctly pass repo to super constructor
Martin von Zweigbergk <martinvonz@google.com> [Tue, 04 Sep 2018 10:36:34 -0700] rev 39461
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
Tue, 04 Sep 2018 20:54:41 -0400 help: correct a typo in tweakdefaults
Matt Harbison <matt_harbison@yahoo.com> [Tue, 04 Sep 2018 20:54:41 -0400] rev 39460
help: correct a typo in tweakdefaults
Mon, 06 Aug 2018 14:06:19 +0300 narrow: add '--import-rules' flag to tracked command
Pulkit Goyal <pulkit@yandex-team.ru> [Mon, 06 Aug 2018 14:06:19 +0300] rev 39459
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
Thu, 23 Aug 2018 13:11:13 -0700 internals: extract wire protocol version 2 commands to standalone doc
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 23 Aug 2018 13:11:13 -0700] rev 39458
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
Thu, 23 Aug 2018 13:46:39 -0700 wireprotov2peer: split responsedata handling into separate function
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 23 Aug 2018 13:46:39 -0700] rev 39457
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
Wed, 22 Aug 2018 10:25:47 -0700 httppeer: add TODO about delayed handling of ^C
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 22 Aug 2018 10:25:47 -0700] rev 39456
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
Fri, 31 Aug 2018 08:57:14 -0700 httppeer: log commands for version 2 peer
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 31 Aug 2018 08:57:14 -0700] rev 39455
httppeer: log commands for version 2 peer This will aid testing and debugging. Differential Revision: https://phab.mercurial-scm.org/D4437
Wed, 22 Aug 2018 10:29:30 -0700 wireprotov2peer: add TODO about streaming responses
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 22 Aug 2018 10:29:30 -0700] rev 39454
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
Tue, 04 Sep 2018 12:36:33 -0400 tests: update relnotes test for actual output
Augie Fackler <augie@google.com> [Tue, 04 Sep 2018 12:36:33 -0400] rev 39453
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
Tue, 04 Sep 2018 17:57:49 +0300 py3: use print as a function in tests/test-hgweb.t
Pulkit Goyal <pulkit@yandex-team.ru> [Tue, 04 Sep 2018 17:57:49 +0300] rev 39452
py3: use print as a function in tests/test-hgweb.t Differential Revision: https://phab.mercurial-scm.org/D4461
Tue, 04 Sep 2018 17:58:39 +0300 py3: bytestr a bytes val to make sure we get bytechr while iterating
Pulkit Goyal <pulkit@yandex-team.ru> [Tue, 04 Sep 2018 17:58:39 +0300] rev 39451
py3: bytestr a bytes val to make sure we get bytechr while iterating Differential Revision: https://phab.mercurial-scm.org/D4460
Tue, 04 Sep 2018 17:53:54 +0300 py3: make regexes in hgext/keyword.py bytes
Pulkit Goyal <pulkit@yandex-team.ru> [Tue, 04 Sep 2018 17:53:54 +0300] rev 39450
py3: make regexes in hgext/keyword.py bytes # skip-blame because just b'' prefixes Differential Revision: https://phab.mercurial-scm.org/D4459
Tue, 04 Sep 2018 17:33:59 +0300 py3: add more missing b'' prefixes in test files
Pulkit Goyal <pulkit@yandex-team.ru> [Tue, 04 Sep 2018 17:33:59 +0300] rev 39449
py3: add more missing b'' prefixes in test files # skip-blame because just b'' prefixes Differential Revision: https://phab.mercurial-scm.org/D4458
Tue, 04 Sep 2018 17:33:22 +0300 py3: write the file in str mode in tests/test-rename-merge2.t
Pulkit Goyal <pulkit@yandex-team.ru> [Tue, 04 Sep 2018 17:33:22 +0300] rev 39448
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
Tue, 04 Sep 2018 17:32:09 +0300 py3: add missing b'' prefixes in tests/badserverext.py
Pulkit Goyal <pulkit@yandex-team.ru> [Tue, 04 Sep 2018 17:32:09 +0300] rev 39447
py3: add missing b'' prefixes in tests/badserverext.py # skip-blame because just b'' prefixes Differential Revision: https://phab.mercurial-scm.org/D4456
Tue, 04 Sep 2018 17:19:30 +0300 py3: handle keyword arguments correctly in hgext/acl.py
Pulkit Goyal <pulkit@yandex-team.ru> [Tue, 04 Sep 2018 17:19:30 +0300] rev 39446
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
Tue, 04 Sep 2018 17:16:29 +0300 py3: don't return the revid as unicode in hgext/convert/subversion.py
Pulkit Goyal <pulkit@yandex-team.ru> [Tue, 04 Sep 2018 17:16:29 +0300] rev 39445
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
Tue, 04 Sep 2018 17:15:17 +0300 py3: make sure we pass str in os.sysconf in hgext/convert/common.py
Pulkit Goyal <pulkit@yandex-team.ru> [Tue, 04 Sep 2018 17:15:17 +0300] rev 39444
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
Tue, 04 Sep 2018 12:16:28 -0400 merge with stable
Augie Fackler <augie@google.com> [Tue, 04 Sep 2018 12:16:28 -0400] rev 39443
merge with stable
Tue, 04 Sep 2018 13:29:21 +0900 revlog: fix size of Python nodetree object
Yuya Nishihara <yuya@tcha.org> [Tue, 04 Sep 2018 13:29:21 +0900] rev 39442
revlog: fix size of Python nodetree object Follows up 9f097214fbf3.
Mon, 03 Sep 2018 23:03:19 +0900 revert: stabilize status message of chunks selected interactively
Yuya Nishihara <yuya@tcha.org> [Mon, 03 Sep 2018 23:03:19 +0900] rev 39441
revert: stabilize status message of chunks selected interactively Unfortunately, patch.filterpatch() doesn't preserve the order of the input files. We have to sort them manually.
Wed, 29 Aug 2018 14:29:01 -0700 cborutil: add a buffering decoder
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 29 Aug 2018 14:29:01 -0700] rev 39440
cborutil: add a buffering decoder The sansiodecoder leaves it up to the callers to feed in data that wasn't fully consumed last time. This commit implements a decoder that performs buffering of leftover chunks from the previous invocation. It otherwise behaves identically to sansiodecoder. Differential Revision: https://phab.mercurial-scm.org/D4434
Fri, 31 Aug 2018 15:54:17 -0700 cborutil: remove readindefinitebytestringtoiter()
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 31 Aug 2018 15:54:17 -0700] rev 39439
cborutil: remove readindefinitebytestringtoiter() This was implemented as part of implementing streaming encoding. It was never used outside of tests. Now that we have a full CBOR decoder, it can be used for incremental decoding of indefinite-length byte strings. This also removes the last use of the vendored cbor2 package from this module. Differential Revision: https://phab.mercurial-scm.org/D4433
Tue, 28 Aug 2018 15:02:48 -0700 cborutil: implement sans I/O decoder
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 28 Aug 2018 15:02:48 -0700] rev 39438
cborutil: implement sans I/O decoder The vendored CBOR package decodes by calling read(n) on an object. There are a number of disadvantages to this: * Uses blocking I/O. If sufficient data is not available, the decoder will hang until it is. * No support for partial reads. If the read(n) returns less data than requested, the decoder raises an error. * Requires the use of a file like object. If the original data is in say a buffer, we need to "cast" it to e.g. a BytesIO to appease the decoder. In addition, the vendored CBOR decoder doesn't provide flexibility that we desire. Specifically: * It buffers indefinite length bytestrings instead of streaming them. * It doesn't allow limiting the set of types that can be decoded. This property is useful when implementing a "hardened" decoder that is less susceptible to abusive input. * It doesn't provide sufficient "hook points" and introspection to institute checks around behavior. These are useful for implementing a "hardened" decoder. This all adds up to a reasonable set of justifications for writing our own decoder. So, this commit implements our own CBOR decoder. At the heart of the decoder is a function that decodes a single "item" from a buffer. This item can be a complete simple value or a special value, such as "start of array." Using this function, we can build a decoder that effectively iterates over the stream of decoded items and builds up higher-level values, such as arrays, maps, sets, and indefinite length bytestrings. And we can do this without performing I/O in the decoder itself. The core of the sans I/O decoder will probably not be used directly. Instead, it is expected that we'll build utility functions for invoking the decoder given specific input types. This will allow extreme flexibility in how data is delivered to the decoder. I'm pretty happy with the state of the decoder modulo the TODO items to track wanted features to help with a "hardened" decoder. The one thing I could be convinced to change is the handling of semantic tags. Since we only support a single semantic tag (sets), I thought it would be easier to handle them inline in decodeitem(). This is simpler now. But if we add support for other semantic tags, it will likely be easier to move semantic tag handling outside of decodeitem(). But, properly supporting semantic tags opens up a whole can of worms, as many semantic tags imply new types. I'm optimistic we won't need these in Mercurial. But who knows. I'm also pretty happy with the test coverage. Writing comprehensive tests for partial decoding did flush out a handful of bugs. One general improvement to testing would be fuzz testing for partial decoding. I may implement that later. I also anticipate switching the wire protocol code to this new decoder will flush out any lingering bugs. Differential Revision: https://phab.mercurial-scm.org/D4414
Tue, 28 Aug 2018 15:22:06 -0700 tests: remove use of string in CBOR test
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 28 Aug 2018 15:22:06 -0700] rev 39437
tests: remove use of string in CBOR test We don't use the CBOR string major type in the wire protocol. Let's not test for it. Differential Revision: https://phab.mercurial-scm.org/D4413
Tue, 28 Aug 2018 20:27:36 -0700 internals: document CBOR utilization
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 28 Aug 2018 20:27:36 -0700] rev 39436
internals: document CBOR utilization I spoke with some people at Mozilla about CBOR and they advised me that we should be careful about the subset of CBOR we use in order to mitigate security, performance, and compatibility concerns. This commit establishes a document that attempts to formalize our use of CBOR. Its main limitations are on what types are allowed. It explicitly enumerates which types are supported. Notable missing features include: * Indefinite-length arrays and maps * Text strings (bytes all the way) * Floats * Date/time types * Big integers * Use of indefinite-length byte strings for map keys, values in containers. If we have a need for any of these, we can have a discussion about them when the time comes. Differential Revision: https://phab.mercurial-scm.org/D4412
Mon, 03 Sep 2018 13:56:53 +0300 py3: add new passing test to whitelist found by buildbot
Pulkit Goyal <pulkit@yandex-team.ru> [Mon, 03 Sep 2018 13:56:53 +0300] rev 39435
py3: add new passing test to whitelist found by buildbot Differential Revision: https://phab.mercurial-scm.org/D4451
Mon, 03 Sep 2018 13:53:30 +0300 py3: alias xrange to range in tests/test-fastannotate-revmap.py
Pulkit Goyal <pulkit@yandex-team.ru> [Mon, 03 Sep 2018 13:53:30 +0300] rev 39434
py3: alias xrange to range in tests/test-fastannotate-revmap.py xrange is not available on Python 3. Differential Revision: https://phab.mercurial-scm.org/D4450
Mon, 03 Sep 2018 13:52:49 +0300 py3: add r'' prefix to prevent b'' being prepended
Pulkit Goyal <pulkit@yandex-team.ru> [Mon, 03 Sep 2018 13:52:49 +0300] rev 39433
py3: add r'' prefix to prevent b'' being prepended The keys of keyword arguments should be str. # skip-blame because we are adding just r'' prefixes. Differential Revision: https://phab.mercurial-scm.org/D4449
Fri, 31 Aug 2018 23:28:09 +0530 revert: fix the inconsistency of status msgs in --interactive mode
Sushil khanchi <sushilkhanchi97@gmail.com> [Fri, 31 Aug 2018 23:28:09 +0530] rev 39432
revert: fix the inconsistency of status msgs in --interactive mode Before this patch we were priting every action msg before actually performing that action and that was resulting in inconsistencies; like in --interactive session if user decided to not revert any changes in a file foo, still there will be a msg on console saying "reverting foo". To fix this, I have made some changes to print status msg just before the action it is going to perform, no matter if --interactive or not. Changes made in test-revert-interactive.t reflect the changed behavior. There are also some changes in test-revert.t because of change in the order of messages. Differential Revision: https://phab.mercurial-scm.org/D4380
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -30 +30 +50 +100 +300 +1000 +3000 +10000 tip