Sat, 26 Jan 2019 14:08:35 -0800 tests: add b'' prefixes to flagprocessorext.py
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 26 Jan 2019 14:08:35 -0800] rev 41413
tests: add b'' prefixes to flagprocessorext.py Otherwise a part of test-flavprocessor.t fails due to not setting the proper key. Differential Revision: https://phab.mercurial-scm.org/D5724
Sat, 26 Jan 2019 14:06:07 -0800 tests: add b'' to config file name
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 26 Jan 2019 14:06:07 -0800] rev 41412
tests: add b'' to config file name Without this, things die in the bowels of the config system due to mixing str and bytes. # skip-blame: just b'' prefix Differential Revision: https://phab.mercurial-scm.org/D5723
Sat, 26 Jan 2019 14:00:42 -0800 sslutil: ensure serverhostname is bytes when formatting
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 26 Jan 2019 14:00:42 -0800] rev 41411
sslutil: ensure serverhostname is bytes when formatting It will likely be a str on Python 3. Differential Revision: https://phab.mercurial-scm.org/D5722
Sat, 26 Jan 2019 13:58:58 -0800 sslutil: use raw strings for exception reason compare
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 26 Jan 2019 13:58:58 -0800] rev 41410
sslutil: use raw strings for exception reason compare Otherwise we attempt to compare a bytes to a str on Python 3 and it always fails. Differential Revision: https://phab.mercurial-scm.org/D5721
Sat, 26 Jan 2019 13:40:44 -0800 keepalive: track ready state with a bool
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 26 Jan 2019 13:40:44 -0800] rev 41409
keepalive: track ready state with a bool This code may have been written before Python had a bool type. Differential Revision: https://phab.mercurial-scm.org/D5719
Sat, 26 Jan 2019 13:39:18 -0800 keepalive: use collections.defaultdict for host map
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 26 Jan 2019 13:39:18 -0800] rev 41408
keepalive: use collections.defaultdict for host map Cleaning up the code as part of debugging Python 3 issues. Differential Revision: https://phab.mercurial-scm.org/D5718
Sat, 26 Jan 2019 10:57:17 -0800 statichttprepo: use str to appease Python 3
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 26 Jan 2019 10:57:17 -0800] rev 41407
statichttprepo: use str to appease Python 3 The URL fed into urllib and HTTP headers need to be str on Python 3. Differential Revision: https://phab.mercurial-scm.org/D5716
Sat, 26 Jan 2019 10:53:10 -0800 statichttprepo: use URLError.reason directly
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 26 Jan 2019 10:53:10 -0800] rev 41406
statichttprepo: use URLError.reason directly 0b3f4be5c5bf changed str(inst) to inst.reason[0] all the way back in 2006. URLError.reason is a str and we should have taken that attribute in its entirety. I think the code was supposed to be inst.args[1] for compatibility with ancient Python versions. Python 2.7 always sets .reason, so it should be safe to use directly. Differential Revision: https://phab.mercurial-scm.org/D5715
Sat, 26 Jan 2019 10:40:37 -0800 mail: document behavior of Python 3
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 26 Jan 2019 10:40:37 -0800] rev 41405
mail: document behavior of Python 3 test-notify.t (and possibly other tests) are failing on Python 3 because email.message.Message is now aware of encodings and attempts to roundtrip values with the specified message encoding. Python 2 doesn't perform this roundtripping. We have tests with non-ascii data being serialized to a message that claims to use ascii encoding. I /think/ Mercurial's behavior may be buggy here. But I'm not sure. I'm documenting the behavior so the next person who looks into this doesn't start from scratch like I did. Differential Revision: https://phab.mercurial-scm.org/D5714
Sat, 26 Jan 2019 10:22:09 -0800 notify: be more defensive aboute None values
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 26 Jan 2019 10:22:09 -0800] rev 41404
notify: be more defensive aboute None values encoding.strtolocal is the identity function on Python 2 but an actual string manipulation routine on Python 3. In some cases, we were passing None, which caused Python 3 to barf. Let's change the code to react properly when the value is None. Differential Revision: https://phab.mercurial-scm.org/D5713
Sat, 26 Jan 2019 10:00:17 -0800 wireprotov2server: use our JSON encoder
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 26 Jan 2019 10:00:17 -0800] rev 41403
wireprotov2server: use our JSON encoder Python's json module doesn't like to encode bytes instances. This makes this code difficult to work with Python 3. We simply swap in Mercurial's JSON encoder to work around it. Differential Revision: https://phab.mercurial-scm.org/D5712
Fri, 25 Jan 2019 17:11:49 -0800 tests: add optional setsockopt() lines for Python 3
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 25 Jan 2019 17:11:49 -0800] rev 41402
tests: add optional setsockopt() lines for Python 3 Differential Revision: https://phab.mercurial-scm.org/D5711
Sat, 26 Jan 2019 13:14:21 +0530 diffstat: support filenames with whitespaces on renames
Navaneeth Suresh <navaneeths1998@gmail.com> [Sat, 26 Jan 2019 13:14:21 +0530] rev 41401
diffstat: support filenames with whitespaces on renames This is a follow-up patch to D5628. `line.split()` cannot get filenames with whitespaces as mentioned by @yuja. This patch replaces `split()` method with `slice`. Corresponding tests were also added. Differential Revision: https://phab.mercurial-scm.org/D5709
Mon, 21 Jan 2019 23:08:31 -0800 largefiles: avoid walking full manifest
Martin von Zweigbergk <martinvonz@google.com> [Mon, 21 Jan 2019 23:08:31 -0800] rev 41400
largefiles: avoid walking full manifest When using treemanifest, diffs between two manifests can often be much cheaper than iterating the full manifests (because common subtrees are skipped). Differential Revision: https://phab.mercurial-scm.org/D5644
Fri, 25 Jan 2019 23:22:23 -0800 cleanup: use p1() instead of parents() when we only need the first parent
Martin von Zweigbergk <martinvonz@google.com> [Fri, 25 Jan 2019 23:22:23 -0800] rev 41399
cleanup: use p1() instead of parents() when we only need the first parent Differential Revision: https://phab.mercurial-scm.org/D5708
Fri, 25 Jan 2019 23:43:11 -0800 cleanup: use repo['.'] instead of repo[None].p1()
Martin von Zweigbergk <martinvonz@google.com> [Fri, 25 Jan 2019 23:43:11 -0800] rev 41398
cleanup: use repo['.'] instead of repo[None].p1() Differential Revision: https://phab.mercurial-scm.org/D5707
Fri, 25 Jan 2019 23:36:23 -0800 cleanup: use p1() and p2() instead of parents()[0] and parents()[1]
Martin von Zweigbergk <martinvonz@google.com> [Fri, 25 Jan 2019 23:36:23 -0800] rev 41397
cleanup: use p1() and p2() instead of parents()[0] and parents()[1] We have had these methods on both contexts and dirstate for a long time now. Differential Revision: https://phab.mercurial-scm.org/D5706
Mon, 21 Jan 2019 15:29:14 +0000 branchmap: rename partial -> bcache
Martijn Pieters <mj@octobus.net> [Mon, 21 Jan 2019 15:29:14 +0000] rev 41396
branchmap: rename partial -> bcache The name better reflects that we have a branchcache object here, even if at *some point* it is still being constructed. Differential Revision: https://phab.mercurial-scm.org/D5290
Mon, 21 Jan 2019 13:45:12 -0800 context: delete mistaken comment about return value of renamed()
Martin von Zweigbergk <martinvonz@google.com> [Mon, 21 Jan 2019 13:45:12 -0800] rev 41395
context: delete mistaken comment about return value of renamed() The comment seems to think that the return value of renamed() is a tuple of source pathsx in the parents, but it's actually a pair of (rename source path, file nodeid). Differential Revision: https://phab.mercurial-scm.org/D5639
Tue, 15 Jan 2019 16:55:20 -0800 copies: get working copy parents from wctx, not dirstate, to make in-mem work
Martin von Zweigbergk <martinvonz@google.com> [Tue, 15 Jan 2019 16:55:20 -0800] rev 41394
copies: get working copy parents from wctx, not dirstate, to make in-mem work Before this patch, `run-tests.py test-rebase-conflicts.t --extra-config-opt rebase.experimental.inmemory=1` would have some lines that say "searching for copies back to rev 3" changed to "... rev 1". I don't know of a better way of testing this patch than doing that manually. There are many other differences, so we're not ready to use #testcases syntax on the entire test-rebase-conflicts.t yet. Differential Revision: https://phab.mercurial-scm.org/D5596
Tue, 15 Jan 2019 16:50:50 -0800 copies: pass contexts into _findlimit()
Martin von Zweigbergk <martinvonz@google.com> [Tue, 15 Jan 2019 16:50:50 -0800] rev 41393
copies: pass contexts into _findlimit() Just a little refactoring to make the next patch simpler. Differential Revision: https://phab.mercurial-scm.org/D5595
Tue, 15 Jan 2019 11:16:42 -0800 copies: consider nullrev a common ancestor
Martin von Zweigbergk <martinvonz@google.com> [Tue, 15 Jan 2019 11:16:42 -0800] rev 41392
copies: consider nullrev a common ancestor I've seen many bugs in the git codebase that were caused by it not having a null revision and being forced to treat root commits differently. Mercurial has a null revision and I think it's generally a bug to treat it differently from other commits in graph algorithms. This effectively undoes 83cfa1baf8ad (copies: don't report copies with unrelated branch, 2010-01-01). The test cases that that commit added still passes. I suspect some other fix after that commit made it unnecessary. Differential Revision: https://phab.mercurial-scm.org/D5594
Thu, 17 Jan 2019 09:18:48 -0800 unshare: use context manager for locks
Martin von Zweigbergk <martinvonz@google.com> [Thu, 17 Jan 2019 09:18:48 -0800] rev 41391
unshare: use context manager for locks Differential Revision: https://phab.mercurial-scm.org/D5695
Fri, 25 Jan 2019 21:23:16 -0500 py3: new tests from the ratchet
Augie Fackler <augie@google.com> [Fri, 25 Jan 2019 21:23:16 -0500] rev 41390
py3: new tests from the ratchet Thanks to indygreg for doing the work on these! Differential Revision: https://phab.mercurial-scm.org/D5705
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -24 +24 +50 +100 +300 +1000 +3000 +10000 tip