Thu, 11 Oct 2018 23:07:23 +0200 py3: tweak stdout writing in test-hgweb-no-path-info.t
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 11 Oct 2018 23:07:23 +0200] rev 40161
py3: tweak stdout writing in test-hgweb-no-path-info.t We want to write bytes for convenience. This requires sys.stdout.buffer. But using sys.stdout.buffer introducing buffered output. So we sprinkle code with sys.stdout.flush() to force immediate writes. After all that, Python 3 was emitting b'' prefixed output for errors. So we only print errors if there were some. There aren't, so b'' don't come into play and output is identical in Python 2 and 3. Differential Revision: https://phab.mercurial-scm.org/D4972
Thu, 11 Oct 2018 22:53:44 +0200 py3: use .+ instead of .* in regexp pattern
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 11 Oct 2018 22:53:44 +0200] rev 40160
py3: use .+ instead of .* in regexp pattern Python 3.7 changed the behavior of re.sub(). See https://bugs.python.org/issue33585. The new code should work on old and new Pythons. Differential Revision: https://phab.mercurial-scm.org/D4971
Thu, 11 Oct 2018 22:26:12 +0200 py3: coerce bytestr to bytes to appease urllib.parse.quote_from_bytes()
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 11 Oct 2018 22:26:12 +0200] rev 40159
py3: coerce bytestr to bytes to appease urllib.parse.quote_from_bytes() Differential Revision: https://phab.mercurial-scm.org/D4969
Thu, 11 Oct 2018 21:47:39 +0200 py3: pass str and return bytes from mimetypes.guess_type()
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 11 Oct 2018 21:47:39 +0200] rev 40158
py3: pass str and return bytes from mimetypes.guess_type() This function wants a str (which represents a path) and returns a str. We normalize input to str and output to bytes. Differential Revision: https://phab.mercurial-scm.org/D4967
Thu, 11 Oct 2018 22:27:52 +0200 py3: use bytes literal in test-hgweb-json.t
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 11 Oct 2018 22:27:52 +0200] rev 40157
py3: use bytes literal in test-hgweb-json.t # skip-blame just b'' prefix Differential Revision: https://phab.mercurial-scm.org/D4970
Thu, 11 Oct 2018 22:01:54 +0200 py3: convert diff opcode name to bytes
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 11 Oct 2018 22:01:54 +0200] rev 40156
py3: convert diff opcode name to bytes Differential Revision: https://phab.mercurial-scm.org/D4968
Thu, 11 Oct 2018 21:22:43 +0200 py3: byteify hgweberror.py
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 11 Oct 2018 21:22:43 +0200] rev 40155
py3: byteify hgweberror.py # skip-blame just b'' prefixes Differential Revision: https://phab.mercurial-scm.org/D4966
Thu, 11 Oct 2018 21:18:58 +0200 py3: encode JSON str to bytes
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 11 Oct 2018 21:18:58 +0200] rev 40154
py3: encode JSON str to bytes json.dumps() will emit UTF-8 str on Python 2 and 3. Use sysbytes to force the .encode('utf-8') on Python 3 and no-op on Python 2. Differential Revision: https://phab.mercurial-scm.org/D4965
Thu, 11 Oct 2018 21:05:03 +0200 py3: use b'' in test-check-interfaces.py
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 11 Oct 2018 21:05:03 +0200] rev 40153
py3: use b'' in test-check-interfaces.py # skip-blame just b'' prefixes Differential Revision: https://phab.mercurial-scm.org/D4964
Fri, 12 Oct 2018 06:22:43 +0200 revlog: optimize ancestors() to not check filtered revisions for each
Yuya Nishihara <yuya@tcha.org> [Fri, 12 Oct 2018 06:22:43 +0200] rev 40152
revlog: optimize ancestors() to not check filtered revisions for each While reviewing the Rust implementation, I noticed iter(ancestors) doesn't need to check filtering state for each parent revision. And doing that appears to have some measurable perf win. $ hg perfancestors -R mercurial (orig) wall 0.038093 comb 0.040000 user 0.040000 sys 0.000000 (best of 100) (this) wall 0.024795 comb 0.020000 user 0.020000 sys 0.000000 (best of 117)
(0) -30000 -10000 -3000 -1000 -300 -100 -10 +10 +100 +300 +1000 +3000 +10000 tip