Mon, 04 Nov 2019 09:56:10 +0100 py3: use raw string to query EmailMessage in gnuarch converter stable
Denis Laxalde <denis@laxalde.org> [Mon, 04 Nov 2019 09:56:10 +0100] rev 43383
py3: use raw string to query EmailMessage in gnuarch converter
Mon, 04 Nov 2019 09:52:13 +0100 py3: use mail.parsebytes() in gnuarch catlog parser stable
Denis Laxalde <denis@laxalde.org> [Mon, 04 Nov 2019 09:52:13 +0100] rev 43382
py3: use mail.parsebytes() in gnuarch catlog parser We drop 'catlogparser' attribute now unused.
Mon, 04 Nov 2019 09:35:10 +0100 tests: handle Message-Id line wrapping in test-notify-changegroup.t stable
Denis Laxalde <denis@laxalde.org> [Mon, 04 Nov 2019 09:35:10 +0100] rev 43381
tests: handle Message-Id line wrapping in test-notify-changegroup.t This fixes this test on Python 3 with a long hostname. See changeset 4128ffba4431 for details.
Sat, 02 Nov 2019 12:09:35 -0700 py3: define and use json.loads polyfill stable
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 02 Nov 2019 12:09:35 -0700] rev 43380
py3: define and use json.loads polyfill Python 3.5's json.loads() requires a str. Only Python 3.6+ supports passing a bytes or bytearray. This commit implements a json.loads() polyfill on Python 3.5 so that we can use bytes. The added function to detect encodings comes verbatim from Python 3.7.
Sat, 02 Nov 2019 11:48:38 -0700 contrib: require Python 3.6 for byteify-strings.py stable
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 02 Nov 2019 11:48:38 -0700] rev 43379
contrib: require Python 3.6 for byteify-strings.py This script makes use of `token.COMMENT`, which apparently isn't present until Python 3.6. So make the script and its test conditional on Python 3.6.
Sat, 02 Nov 2019 11:42:46 -0700 demandimportpy3: only use lazy extension loader on Python 3.6+ stable
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 02 Nov 2019 11:42:46 -0700] rev 43378
demandimportpy3: only use lazy extension loader on Python 3.6+ There was an inline comment denoting a bug in the lazy extension loader on Python 3.5 which prevents it from working there. But the code was not conditional on the Python version. The result of this was a myriad of failures on Python 3.5 due to getattr() and friends not working on lazy extension modules. By making extension modules non-lazy on Python 3.5, we reduce the number of test failures from 48 to 22 on that Python version.
Sat, 02 Nov 2019 15:33:39 -0700 ui: flush before prompting for input with readline stable
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 02 Nov 2019 15:33:39 -0700] rev 43377
ui: flush before prompting for input with readline I was using `hg absorb` with Python 3 and noticed that the prompt was appearing without any output about what would be done. After I answered the prompt, the output was printed to stdout. This appears to be a buffering difference between Python 2 and Python 3. To work around it, this commit adds an explicit flush() before calling the raw input function when readline is used.
Fri, 01 Nov 2019 21:46:34 -0700 histedit: restore hex nodeids to be 12 digits long stable
Martin von Zweigbergk <martinvonz@google.com> [Fri, 01 Nov 2019 21:46:34 -0700] rev 43376
histedit: restore hex nodeids to be 12 digits long I accidentally switched from 12 digits to 40 digits while making the code py3-compatible. Thanks to Yuya for noticing. Differential Revision: https://phab.mercurial-scm.org/D7200
Tue, 29 Oct 2019 10:54:08 -0700 tests: fix typo "includfe" stable
Martin von Zweigbergk <martinvonz@google.com> [Tue, 29 Oct 2019 10:54:08 -0700] rev 43375
tests: fix typo "includfe" Differential Revision: https://phab.mercurial-scm.org/D7180
Fri, 01 Nov 2019 11:02:47 -0700 py3: fix fsmonitor's _watchmantofsencoding exception message encoding stable
Emmanuel Leblond <emmanuel.leblond@gmail.com> [Fri, 01 Nov 2019 11:02:47 -0700] rev 43374
py3: fix fsmonitor's _watchmantofsencoding exception message encoding Differential Revision: https://phab.mercurial-scm.org/D7190
Thu, 31 Oct 2019 15:03:12 -0700 py3: use native strings as keys into **opts in chistedit stable
Martin von Zweigbergk <martinvonz@google.com> [Thu, 31 Oct 2019 15:03:12 -0700] rev 43373
py3: use native strings as keys into **opts in chistedit Now you should be able to successfully confirm your histedit plan (at least in the case I tried). Even continuing after conflicts and finishing the histedit worked. Differential Revision: https://phab.mercurial-scm.org/D7186
Thu, 31 Oct 2019 15:00:49 -0700 py3: open chistedit file in binary mode using vfs stable
Martin von Zweigbergk <martinvonz@google.com> [Thu, 31 Oct 2019 15:00:49 -0700] rev 43372
py3: open chistedit file in binary mode using vfs We write bytes to the file, so it should be open in binary mode. Opening it via the vfs takes care of that for us. Now you'll get yet a different traceback if you try to confirm you histedit plan. Differential Revision: https://phab.mercurial-scm.org/D7185
Thu, 31 Oct 2019 15:02:48 -0700 py3: avoid another b''.format() in chistedit stable
Martin von Zweigbergk <martinvonz@google.com> [Thu, 31 Oct 2019 15:02:48 -0700] rev 43371
py3: avoid another b''.format() in chistedit Now you'll get a different traceback if you try to confirm you histedit plan. Differential Revision: https://phab.mercurial-scm.org/D7184
Thu, 31 Oct 2019 15:02:03 -0700 py3: render message about conflicts in chistedit code stable
Martin von Zweigbergk <martinvonz@google.com> [Thu, 31 Oct 2019 15:02:03 -0700] rev 43370
py3: render message about conflicts in chistedit code Now you can also reorder commits that (potentially) conflict. Just don't try to confirm the changes yet (because then it crashes). Differential Revision: https://phab.mercurial-scm.org/D7183
Thu, 31 Oct 2019 14:46:17 -0700 py3: handle keypresses in chistedit stable
Martin von Zweigbergk <martinvonz@google.com> [Thu, 31 Oct 2019 14:46:17 -0700] rev 43369
py3: handle keypresses in chistedit Now you can navigate and change the action for a commit. You can also reorder commits, as long as that doesn't result in a conflict (then it crashes). Differential Revision: https://phab.mercurial-scm.org/D7182
Thu, 31 Oct 2019 14:25:51 -0700 py3: make chistedit render stable
Martin von Zweigbergk <martinvonz@google.com> [Thu, 31 Oct 2019 14:25:51 -0700] rev 43368
py3: make chistedit render Now you can see the list of commits, but it crashes when you press a key. Differential Revision: https://phab.mercurial-scm.org/D7181
Fri, 01 Nov 2019 17:23:02 +0100 py3: fix exception display encoding in contrib/simplemerge.py stable
Emmanuel Leblond <emmanuel.leblond@gmail.com> [Fri, 01 Nov 2019 17:23:02 +0100] rev 43367
py3: fix exception display encoding in contrib/simplemerge.py Differential Revision: https://phab.mercurial-scm.org/D7191
Fri, 01 Nov 2019 17:31:47 +0100 py3: fix exception message check in test-linerange.py's testOutOfRange stable
Emmanuel Leblond <emmanuel.leblond@gmail.com> [Fri, 01 Nov 2019 17:31:47 +0100] rev 43366
py3: fix exception message check in test-linerange.py's testOutOfRange Differential Revision: https://phab.mercurial-scm.org/D7192
Fri, 01 Nov 2019 17:35:36 +0100 py3: fix exception message encoding in scmutil.py's simplekeyvaluefile.read stable
Emmanuel Leblond <emmanuel.leblond@gmail.com> [Fri, 01 Nov 2019 17:35:36 +0100] rev 43365
py3: fix exception message encoding in scmutil.py's simplekeyvaluefile.read Differential Revision: https://phab.mercurial-scm.org/D7193
Fri, 01 Nov 2019 17:38:07 +0100 py3: fix crecord.py's editpatchwitheditor exception message encoding stable
Emmanuel Leblond <emmanuel.leblond@gmail.com> [Fri, 01 Nov 2019 17:38:07 +0100] rev 43364
py3: fix crecord.py's editpatchwitheditor exception message encoding Differential Revision: https://phab.mercurial-scm.org/D7194
Fri, 01 Nov 2019 17:39:17 +0100 py3: fix exception message encoding in infinitepush stable
Emmanuel Leblond <emmanuel.leblond@gmail.com> [Fri, 01 Nov 2019 17:39:17 +0100] rev 43363
py3: fix exception message encoding in infinitepush Differential Revision: https://phab.mercurial-scm.org/D7195
Fri, 01 Nov 2019 10:57:31 -0700 py3: fix fsmonitor's _handleunavailable exception message encoding stable
Emmanuel Leblond <emmanuel.leblond@gmail.com> [Fri, 01 Nov 2019 10:57:31 -0700] rev 43362
py3: fix fsmonitor's _handleunavailable exception message encoding Differential Revision: https://phab.mercurial-scm.org/D7196
Fri, 01 Nov 2019 14:54:08 +0100 packaging: update built-in Fedora support to Fedora 31 stable
Mads Kiilerich <mads@kiilerich.com> [Fri, 01 Nov 2019 14:54:08 +0100] rev 43361
packaging: update built-in Fedora support to Fedora 31 This is now quite easy ...
Fri, 01 Nov 2019 13:51:44 +0100 packaging: refactor "fedora29" target to a single more generic "fedora" target stable
Mads Kiilerich <mads@kiilerich.com> [Fri, 01 Nov 2019 13:51:44 +0100] rev 43360
packaging: refactor "fedora29" target to a single more generic "fedora" target Fedora moves fast in version numbers, and often with Mercurial packaging being backwards compatible. Also, most people use the system package. There is thus much work and tech debt and little value in providing explicit built-in support for several versions. Thus, only aim for providing built-in support for latest Fedora version, and make it easy to update.
Fri, 01 Nov 2019 15:29:14 +0100 packaging: make dockerrpm fedora target more generic stable
Mads Kiilerich <mads@kiilerich.com> [Fri, 01 Nov 2019 15:29:14 +0100] rev 43359
packaging: make dockerrpm fedora target more generic Fedora moves fast in version numbers, and often with Mercurial packaging being backwards compatible. Thus, only aim for providing built-in support for latest Fedora version, and make it easy to update. With this refactoring, 'dockerrpm fedora31' also works. 'dockerrpm fedora' will use the 'fedora:latest' Docker image.
Fri, 01 Nov 2019 12:59:22 +0100 packaging: use "python3" for fedora29 ... and as buildrpm default stable
Mads Kiilerich <mads@kiilerich.com> [Fri, 01 Nov 2019 12:59:22 +0100] rev 43358
packaging: use "python3" for fedora29 ... and as buildrpm default Change the buidrpm default. The CentOS targets explicitly use "python", and changing the default will only influence Fedora 29. A Python 3 package needs python3 dependencies, so pythonexe (and pythonver) is used for specifying dependencies. Other OS versions will keep using "python" as before ... or potentially change to explicit "python2". Fedora 29 packages can thus also still be built for Python 2 - just not in the docker image that is updated for Python 3.
Fri, 01 Nov 2019 12:47:38 +0100 packaging: use "--python python" for centos7 to avoid explicit "python2" stable
Mads Kiilerich <mads@kiilerich.com> [Fri, 01 Nov 2019 12:47:38 +0100] rev 43357
packaging: use "--python python" for centos7 to avoid explicit "python2" This is a partial backout of 92a51a45d44c. We will need to be able to control whether package dependencies are python2 or python3. Generally (at least in recent Fedora), the package prefix match the name of the python executable ... but CentOS 7 doesn't use the python2 prefix in package name or alias for python-docutils yet, so just keep centos7 in the unversioned "python" world. Change the new (unused) buildrpm "--python3" option (introduced in a6dcac6454c1) to "--python python3" to get a more generic method for explicit control over whether we use python, python2 or python3.
Fri, 01 Nov 2019 12:34:08 +0100 packaging: fix docker-centos5 - use pythonexe and set to "python" as before stable
Mads Kiilerich <mads@kiilerich.com> [Fri, 01 Nov 2019 12:34:08 +0100] rev 43356
packaging: fix docker-centos5 - use pythonexe and set to "python" as before Fix 92a51a45d44c .
Fri, 01 Nov 2019 12:18:17 +0100 packaging: move dockerrpm output directory creation to dockerrpm stable
Mads Kiilerich <mads@kiilerich.com> [Fri, 01 Nov 2019 12:18:17 +0100] rev 43355
packaging: move dockerrpm output directory creation to dockerrpm Avoid having to compute the directory in two places in different environments.
Thu, 31 Oct 2019 11:53:11 +0100 packaging: drop "support" for unsupported Fedora versions stable
Mads Kiilerich <mads@kiilerich.com> [Thu, 31 Oct 2019 11:53:11 +0100] rev 43354
packaging: drop "support" for unsupported Fedora versions Fedora 31 has just been released, and Fedora 29 will be EOL in a month. Don't spend any time thinking about dead stuff.
Wed, 30 Oct 2019 16:39:18 -0400 mail: black wants to add this blank line stable
Augie Fackler <augie@google.com> [Wed, 30 Oct 2019 16:39:18 -0400] rev 43353
mail: black wants to add this blank line I can't figure out how this got overlooked on previous runs, but here we are. It looks like the culprit change is already public?
Wed, 30 Oct 2019 16:29:45 -0400 hghave: verify we have a black that is new enough for our format stable
Augie Fackler <augie@google.com> [Wed, 30 Oct 2019 16:29:45 -0400] rev 43352
hghave: verify we have a black that is new enough for our format We require what is currently the absolute latest black, so let's be paranoid.
Wed, 30 Oct 2019 16:17:39 -0400 contrib: fix up example fix configuration for our move to released black stable
Augie Fackler <augie@google.com> [Wed, 30 Oct 2019 16:17:39 -0400] rev 43351
contrib: fix up example fix configuration for our move to released black
Wed, 23 Oct 2019 22:24:14 +0100 phabricator: use True primitive instead of b'true' for phabupdate actions stable
Ian Moody <moz-ian@perix.co.uk> [Wed, 23 Oct 2019 22:24:14 +0100] rev 43350
phabricator: use True primitive instead of b'true' for phabupdate actions Something I'd missed in the creatediff port. This didn't matter before with the old PHP form style wireformat, but breaks with the new arcanist format. Differential Revision: https://phab.mercurial-scm.org/D7152
Wed, 23 Oct 2019 15:07:56 +0100 setup: allow py3 install without env vars stable
Ian Moody <moz-ian@perix.co.uk> [Wed, 23 Oct 2019 15:07:56 +0100] rev 43349
setup: allow py3 install without env vars 5.2 is the first release of Mercurial where py3 support is expected to be widely used, therefore we should allow installing it without hoop-jumping. Differential Revision: https://phab.mercurial-scm.org/D7151
Tue, 29 Oct 2019 11:07:25 +0100 formatting: drop `grey`, our custom black version stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 29 Oct 2019 11:07:25 +0100] rev 43348
formatting: drop `grey`, our custom black version Now that the official black has all we want, we can drop this.
Tue, 29 Oct 2019 10:43:47 +0100 formatting: using black to check for formatting stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 29 Oct 2019 10:43:47 +0100] rev 43347
formatting: using black to check for formatting
Tue, 29 Oct 2019 10:41:30 +0100 formatting: run black version 19.10b0 on the codebase stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 29 Oct 2019 10:41:30 +0100] rev 43346
formatting: run black version 19.10b0 on the codebase The latest version of black is out and contains the change we needed. So we can start using it now. note: `test-check-format.t` will complains about this changes because it still use `grey` and need to be migrated to `black`. See next changesets for this.
Sun, 27 Oct 2019 20:16:59 +0100 packaging: fix buildrpm whitespace stable
Mads Kiilerich <mads@kiilerich.com> [Sun, 27 Oct 2019 20:16:59 +0100] rev 43345
packaging: fix buildrpm whitespace
Sun, 27 Oct 2019 20:16:38 +0100 packaging: drop outdated buildrpm "tested on" comment stable
Mads Kiilerich <mads@kiilerich.com> [Sun, 27 Oct 2019 20:16:38 +0100] rev 43344
packaging: drop outdated buildrpm "tested on" comment Packaging usually works on other versions too, and it is not efficient to maintain the list in repo. It is already out of sync with the Makefile targets.
Mon, 28 Oct 2019 00:29:42 +0100 packaging: also include hgweb.wsgi in rpms stable
Mads Kiilerich <mads@kiilerich.com> [Mon, 28 Oct 2019 00:29:42 +0100] rev 43343
packaging: also include hgweb.wsgi in rpms
Sun, 27 Oct 2019 21:28:26 +0100 packaging: introduce Python3 support as buildrpm --python3 stable
Mads Kiilerich <mads@kiilerich.com> [Sun, 27 Oct 2019 21:28:26 +0100] rev 43342
packaging: introduce Python3 support as buildrpm --python3 Just overrule the HGPYTHON3 warning.
Sun, 27 Oct 2019 21:40:21 +0100 packaging: be explicit about Python version in rpm spec stable
Mads Kiilerich <mads@kiilerich.com> [Sun, 27 Oct 2019 21:40:21 +0100] rev 43341
packaging: be explicit about Python version in rpm spec Fedora 31 has Python3 at /usr/bin/python ... but expect everybody to not just find python in $PATH but be explicit about whether they want python2 or python3. mercurial.spec just used 'python' and would fail when it unknowingly used Python 3 and ended up with Mercurial setup.py reporting "Python 3.7 detected." and talking about the HGPYTHON3 environment variable. For now, just be explicit about using system python2 as python executable when building rpms.
Sun, 27 Oct 2019 20:17:33 +0100 packaging: make python snippets in rpm building python3 compatible stable
Mads Kiilerich <mads@kiilerich.com> [Sun, 27 Oct 2019 20:17:33 +0100] rev 43340
packaging: make python snippets in rpm building python3 compatible Fedora 31 has Python3 at /usr/bin/python, and buildrpm would fail on snippets that use python2 syntax. Instead of forcing python2, just accept for the future while staying backwards compatible.
Wed, 30 Oct 2019 21:49:48 +0900 py3: fix patchbomb to accept non-ASCII header value for email preview stable
Yuya Nishihara <yuya@tcha.org> [Wed, 30 Oct 2019 21:49:48 +0900] rev 43339
py3: fix patchbomb to accept non-ASCII header value for email preview Since mail.headencode() is disabled by -n/--test, non-ASCII header value has to be allowed. Spotted by Denis Laxalde.
Fri, 25 Oct 2019 12:10:45 +0200 tests: check patchbomb with a non-ascii commit message stable
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 25 Oct 2019 12:10:45 +0200] rev 43338
tests: check patchbomb with a non-ascii commit message This fails on Python 3 but gets fixed in the next changeset.
Sun, 27 Oct 2019 12:49:09 +0900 formatter: fix handling of None value in templater mapping stable
Yuya Nishihara <yuya@tcha.org> [Sun, 27 Oct 2019 12:49:09 +0900] rev 43337
formatter: fix handling of None value in templater mapping For historical reasons, None in mapping dict means there's no such keyword, and falls back to b"". That's fine in log templates where mapping item is generally a callable returning a value (which may be None,) but the formatter directly puts an "evaluated" value in the mapping. So the None value has to be lifted to wrappedvalue(None) to avoid confusion in the template engine.
Sun, 27 Oct 2019 12:36:52 +0900 config: add support for defaultvalue of list of printable elements stable
Yuya Nishihara <yuya@tcha.org> [Sun, 27 Oct 2019 12:36:52 +0900] rev 43336
config: add support for defaultvalue of list of printable elements
Sun, 27 Oct 2019 12:30:59 +0900 config: fix -Tjson to not crash due to unsupported defaultvalue types stable
Yuya Nishihara <yuya@tcha.org> [Sun, 27 Oct 2019 12:30:59 +0900] rev 43335
config: fix -Tjson to not crash due to unsupported defaultvalue types Maybe it isn't great to ignore unsupported types at all, but otherwise "hg config -Tjson" would crash.
Sun, 27 Oct 2019 18:12:24 +0100 tests: handle Message-Id email header possible wrapping stable
Denis Laxalde <denis@laxalde.org> [Sun, 27 Oct 2019 18:12:24 +0100] rev 43334
tests: handle Message-Id email header possible wrapping The "Message-Id" header will get wrapped with a new line when exceeding 75 characters on Python 3 (see changeset 7d4f2e4899c5 introducing usage of email.header.Header.encode and respective doc). This will occur in an unpredictable manner depending on the hostname's length. To make the test output consistent across Python versions and hostname configuration, we add a filter to unwrap this header value.
Sun, 27 Oct 2019 12:51:53 +0900 py3: leverage pycompat.long stable
Yuya Nishihara <yuya@tcha.org> [Sun, 27 Oct 2019 12:51:53 +0900] rev 43333
py3: leverage pycompat.long
Fri, 25 Oct 2019 14:02:40 +0200 packaging: remove version info from Breaks+Replaces in Debian package stable
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 25 Oct 2019 14:02:40 +0200] rev 43332
packaging: remove version info from Breaks+Replaces in Debian package The versioned Breaks: and Replaces: cause problem when trying to install our package over the one in Debian. $ sudo apt install ./packages/debian-buster/mercurial_5.2~rc0+15-buster-a2ff3aff81d2_amd64.deb Reading package lists... Done Building dependency tree Reading state information... Done Note, selecting 'mercurial' instead of './packages/debian-buster/mercurial_5.2~rc0+15-buster-a2ff3aff81d2_amd64.deb' Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: mercurial : Breaks: mercurial-common (< 5.2~rc0+15-buster-a2ff3aff81d2) but 5.2~rc0-1 is to be installed E: Unable to correct problems, you have held broken packages. Removing version information resolves the situation.
Thu, 24 Oct 2019 17:28:57 +0200 py3: fix generated non-ascii message in test-notify.t stable
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 24 Oct 2019 17:28:57 +0200] rev 43331
py3: fix generated non-ascii message in test-notify.t The resulting "Subject:" header contains an encoded word in Python 3 so we have to add distinct outputs for Python 3 but underlying values are the same: >>> from email.header import decode_header >>> decode_header('=?utf-8?b?w6AuLi4=?=') [(b'\xc3\xa0...', 'utf-8')]
Thu, 24 Oct 2019 14:28:20 +0200 py3: decode encoding literal before passing to .decode() stable
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 24 Oct 2019 14:28:20 +0200] rev 43330
py3: decode encoding literal before passing to .decode() bytes.decode(<encoding>) wants an str as "encoding" parameter, it raises a TypeError if given a bytestring. encoding.encoding and encoding.fallbackencoding are bytes values.
Thu, 24 Oct 2019 16:34:43 +0200 py3: decode payload of notify email stable
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 24 Oct 2019 16:34:43 +0200] rev 43329
py3: decode payload of notify email This fixes one UnicodeEncodeError in test-notify.t:422 when testing the notify hook with non-ascii content (there are more later). We only decode on Python 3, since it's not safe for sure on Python 2.
Thu, 24 Oct 2019 15:50:15 +0200 py3: decode email headers with mail.headdecode() in notify extension stable
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 24 Oct 2019 15:50:15 +0200] rev 43328
py3: decode email headers with mail.headdecode() in notify extension
Thu, 24 Oct 2019 15:46:16 +0200 py3: use stdlib's parseaddr() to get sender header in notify extension stable
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 24 Oct 2019 15:46:16 +0200] rev 43327
py3: use stdlib's parseaddr() to get sender header in notify extension In Python 3, email headers are unicode string so using stringutil.email() will not work as it compares with bytestring. So let's use email.utils.parseaddr() from the stdlib which has a consistent behavior across Python versions. The same is done in patchbomb extension already.
Thu, 24 Oct 2019 15:28:00 +0200 py3: use a BytesParser in notify extension stable
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 24 Oct 2019 15:28:00 +0200] rev 43326
py3: use a BytesParser in notify extension This is the first step to make the "long line" case in test-notify.t pass by fixing a UnicodeDecodeError on Python 3. We alias a parsebytes() in mail module, similarly as we already have a parse() function for Python 2 and Python 3 compatibility.
Thu, 24 Oct 2019 17:16:43 +0200 py3: fix headencode() with display=False stable
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 24 Oct 2019 17:16:43 +0200] rev 43325
py3: fix headencode() with display=False We previously called str() on a email.header.Header object. On Python 2, this returns a bytestring and the __str__ method is actually an alias to .encode() method. On Python 3, __str__ does not perform encoding (and returns a unicode string). To keep a consistent behavior across Python versions, we explicitly use .encode() and we wrap the result with encoding.strtolocal() to get a bytestring in all cases. As a side effect of forcing bytes conversion, we need to decode back in _addressencode(). This is to make test-notify.t pass on Python 3. Also note that headers are now encoded in some patchbomb tests; this is because the charset is not always "us-ascii" ("iso-8859-1" otherwise) on Python 3.
Thu, 24 Oct 2019 14:31:24 +0200 mail: catch LookupError in headdecode() stable
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 24 Oct 2019 14:31:24 +0200] rev 43324
mail: catch LookupError in headdecode() We already catch this exception in _encode() (called by headencode()). It gets raised when running test-notify.t with Python 3.
Thu, 24 Oct 2019 16:56:36 +0200 py3: account for extra line break in email headers in test-notify.t stable
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 24 Oct 2019 16:56:36 +0200] rev 43323
py3: account for extra line break in email headers in test-notify.t Long headers appears to be wrapped with new lines. In test-notify.t, we have a "filter.py" that replaces "\n" by " ", so we get an extra space in a Message-Id with a long value.
Thu, 10 Oct 2019 13:48:30 +0200 py3: use as_bytes() method of EmailMessage stable
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 10 Oct 2019 13:48:30 +0200] rev 43322
py3: use as_bytes() method of EmailMessage In Python 3, as_bytes() corresponds to as_string() in Python 2.
Wed, 23 Oct 2019 23:00:58 +0100 py3: use %d instead of %s when formatting an int into a bytestring stable
Ian Moody <moz-ian@perix.co.uk> [Wed, 23 Oct 2019 23:00:58 +0100] rev 43321
py3: use %d instead of %s when formatting an int into a bytestring The latter wasn't noticed before since no tests exercise --confirm at all, let alone on an existing DREV. The former is only hit during an intermittent network issue during amending at the end of a phabsend, so doesn't seem testable. Differential Revision: https://phab.mercurial-scm.org/D7153
Wed, 23 Oct 2019 17:18:16 +0200 packaging: ship only a single binary Debian package stable
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 23 Oct 2019 17:18:16 +0200] rev 43320
packaging: ship only a single binary Debian package We merge the mercurial and mercurial-common binary packages into a single mercurial package. This is essentially to ease installation (and upgrade) using a simple "dpkg -i" command. This also simplifies debian/rules by removing arch (in)dependent cleanups during installation. We have the mercurial binary Breaks: and Replaces: mercurial-common so that the latter will be removed upon upgrade. Also note the change from "override_dh_install" to "override_dh_auto_install" in debian/rules: this is because we do not want "make install" to be run automatically as we need the --install-layout=deb of "setup.py install" (otherwise, files would end up in $DESTDIR/usr/local).
Wed, 23 Oct 2019 17:18:57 +0200 packaging: avoid running bare "make install" in debian/rules stable
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 23 Oct 2019 17:18:57 +0200] rev 43319
packaging: avoid running bare "make install" in debian/rules We change the "override_dh_install" target to "override_dh_auto_install" in debian/rules (see dh_auto_install(1) for details). This is because we do not want "make install" to be run automatically as we need the --install-layout=deb of "setup.py install". Otherwise, files end up in $DESTDIR/usr/local. At the moment, this is not a problem since files installed in debian/tmp (the default location) are not packed into binary packages (because there are debian/mercurial and debian/mercurial-common directories). This is cleaner to avoid running make more than needed.
Wed, 23 Oct 2019 16:35:27 +0200 packaging: distinguish clean and build steps from install in Debian stable
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 23 Oct 2019 16:35:27 +0200] rev 43318
packaging: distinguish clean and build steps from install in Debian
Wed, 23 Oct 2019 16:25:41 +0200 packaging: also move Debian .buildinfo file in output directory stable
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 23 Oct 2019 16:25:41 +0200] rev 43317
packaging: also move Debian .buildinfo file in output directory
Mon, 21 Oct 2019 19:53:30 -0700 packaging: upgrade packages distributed with Windows installers stable
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 21 Oct 2019 19:53:30 -0700] rev 43316
packaging: upgrade packages distributed with Windows installers We like to use the latest versions of things. I added pywin32-ctypes to the explicit list of packages so running on !Windows will pull in the dependency.
Mon, 21 Oct 2019 19:28:23 -0700 automation: install Python 2.7.17, 3.7.5, and PyPy 7.2.0 stable
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 21 Oct 2019 19:28:23 -0700] rev 43315
automation: install Python 2.7.17, 3.7.5, and PyPy 7.2.0 These were all recently released and we should use them in automation.
Mon, 21 Oct 2019 19:25:06 -0700 contrib: install Python 2.7.17 and 3.7.5 in Windows environment stable
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 21 Oct 2019 19:25:06 -0700] rev 43314
contrib: install Python 2.7.17 and 3.7.5 in Windows environment These are the latest Python versions and we should use them.
Mon, 21 Oct 2019 11:48:59 +0200 packaging: use /usr/bin/python3 shebang for scripts in Debian stable
Denis Laxalde <denis@laxalde.org> [Mon, 21 Oct 2019 11:48:59 +0200] rev 43313
packaging: use /usr/bin/python3 shebang for scripts in Debian "hg" script is already correct because it is handled by setup.py but "hg-ssh" will be rewritten by dh_python into "/usr/bin/python" which is not wanted as we target Python 3. By passing --shebang=/usr/bin/python3 to dh_python3, we force shebangs to be set with this value.
Mon, 21 Oct 2019 11:32:54 +0200 packaging: fix path where .deb files are looked for stable
Denis Laxalde <denis@laxalde.org> [Mon, 21 Oct 2019 11:32:54 +0200] rev 43312
packaging: fix path where .deb files are looked for In builddeb script, the path where .deb files are looked for should simply be $OUTPUTDIR since the previous instruction moves those files there. This fixes "make deb".
Mon, 21 Oct 2019 09:52:31 +0200 packaging: let Debian package depends on sensible-utils stable
Denis Laxalde <denis@laxalde.org> [Mon, 21 Oct 2019 09:52:31 +0200] rev 43311
packaging: let Debian package depends on sensible-utils This fixes the following Lintian error: E: mercurial-common: missing-depends-on-sensible-utils etc/mercurial/hgrc.d/default-tools.rc
Mon, 21 Oct 2019 10:59:54 +0200 packaging: upgrade Debian packaging to build with Python 3 stable
Denis Laxalde <denis@laxalde.org> [Mon, 21 Oct 2019 10:59:54 +0200] rev 43310
packaging: upgrade Debian packaging to build with Python 3 Also drop the explicit "Depends: python" as debhelper will add it.
Mon, 21 Oct 2019 11:26:41 +0200 py3: decode bytes before logging in run-tests.py stable
Denis Laxalde <denis@laxalde.org> [Mon, 21 Oct 2019 11:26:41 +0200] rev 43309
py3: decode bytes before logging in run-tests.py Avoids messages like "Found prerequisite b'diff' at b'/usr/bin/diff'" under Python 3.
Mon, 21 Oct 2019 11:14:28 -0400 Added signature for changeset 59338f956109 stable
Augie Fackler <raf@durin42.com> [Mon, 21 Oct 2019 11:14:28 -0400] rev 43308
Added signature for changeset 59338f956109
Mon, 21 Oct 2019 11:14:27 -0400 Added tag 5.2rc0 for changeset 59338f956109 stable
Augie Fackler <raf@durin42.com> [Mon, 21 Oct 2019 11:14:27 -0400] rev 43307
Added tag 5.2rc0 for changeset 59338f956109
Mon, 21 Oct 2019 11:09:48 -0400 merge default into stable for 5.2 release stable 5.2rc0
Augie Fackler <augie@google.com> [Mon, 21 Oct 2019 11:09:48 -0400] rev 43306
merge default into stable for 5.2 release
Fri, 18 Oct 2019 11:18:41 -0400 grep: update docs to reflect new --all-files default
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Fri, 18 Oct 2019 11:18:41 -0400] rev 43305
grep: update docs to reflect new --all-files default These docs no longer even mention the old weird behaviour that was poorly understood and underutilised. I think this undocumentation effectively deprecates it.
Sun, 06 Oct 2019 11:06:10 -0400 grep: enable all-files by default (BC)
Sushil khanchi <sushilkhanchi97@gmail.com> [Sun, 06 Oct 2019 11:06:10 -0400] rev 43304
grep: enable all-files by default (BC) This patch deprecates the `--all-files` flag and make the all-files behaviour as default. In test-grep.t, I removed '--all-files' from every command where it was used, to reflect that all-files behaviour is default and there is no change even after the removal. And other changes in test files are because of changed behaviour. Differential Revision: https://phab.mercurial-scm.org/D7000 .. bc:: `hg grep` now searches working copy file contents by default. We recognize this is a significant change from past behavior, but surveys of large bodies of users indicated nobody used (and almost nobody understood) the previous no-flags behavior of `hg grep`. The new behavior aligns with the behavior most users expected (including hg's maintainers), which also happens to be the behavior of `git grep`. Given that the old behavior was confusing to the point of being unusable, we were comfortable changing this behavior.
Mon, 21 Oct 2019 11:08:23 +0200 lfs: dedent documentation section about .hglfs file
Denis Laxalde <denis@laxalde.org> [Mon, 21 Oct 2019 11:08:23 +0200] rev 43303
lfs: dedent documentation section about .hglfs file The leading ".hglfs::" is interpreted as a macro in generated man page and, as it is unknown, the whole section does not render. Also, having the section marked as preformatted (::) makes it render verbatim in HTML, which is not desired as the text contains formatting markers. So we just dedent the section and remove the ".hglfs::" line. The example file is still indented and rendered preformatted.
Thu, 17 Oct 2019 16:06:06 +0200 copies: simplify chain loop
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 17 Oct 2019 16:06:06 +0200] rev 43302
copies: simplify chain loop This is a mostly gratuitous change to make the code more direct. Differential Revision: https://phab.mercurial-scm.org/D7131
Thu, 17 Oct 2019 02:17:24 +0200 sidedatacopies: only fetch information once for merge
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 17 Oct 2019 02:17:24 +0200] rev 43301
sidedatacopies: only fetch information once for merge Before this change, merge would result in reading the data from revlog twice. With this change, we keep the information in memory until we encounter the other parent. When looking at pypy, I see about 1/3 of the changesets with copy information being merge. Not doing duplicated fetch for them provide a significant speedup. revision: large amount; added files: large amount; rename small amount; c3b14617fbd7 9ba6ab77fd29 before: ! wall 0.767042 comb 0.760000 user 0.750000 sys 0.010000 (median of 11) after: ! wall 0.671162 comb 0.670000 user 0.650000 sys 0.020000 (median of 13) revision: large amount; added files: small amount; rename small amount; c3b14617fbd7 f650a9b140d2 before: ! wall 1.170169 comb 1.170000 user 1.130000 sys 0.040000 (median of 10) after: ! wall 1.030596 comb 1.040000 user 1.010000 sys 0.030000 (median of 10) revision: large amount; added files: large amount; rename large amount; 08ea3258278e d9fa043f30c0 before: ! wall 0.209846 comb 0.200000 user 0.200000 sys 0.000000 (median of 46) after: ! wall 0.170981 comb 0.170000 user 0.170000 sys 0.000000 (median of 56) revision: small amount; added files: large amount; rename large amount; df6f7a526b60 a83dc6a2d56f before: ! wall 0.013248 comb 0.010000 user 0.010000 sys 0.000000 (median of 223) after: ! wall 0.013295 comb 0.020000 user 0.020000 sys 0.000000 (median of 222) revision: small amount; added files: large amount; rename small amount; 4aa4e1f8e19a 169138063d63 before: ! wall 0.001672 comb 0.000000 user 0.000000 sys 0.000000 (median of 1000) after: ! wall 0.001666 comb 0.000000 user 0.000000 sys 0.000000 (median of 1000) revision: small amount; added files: small amount; rename small amount; 4bc173b045a6 964879152e2e before: ! wall 0.000119 comb 0.000000 user 0.000000 sys 0.000000 (median of 8010) after: ! wall 0.000119 comb 0.000000 user 0.000000 sys 0.000000 (median of 8007) revision: medium amount; added files: large amount; rename medium amount; c95f1ced15f2 2c68e87c3efe before: ! wall 0.168599 comb 0.160000 user 0.160000 sys 0.000000 (median of 58) after: ! wall 0.133316 comb 0.140000 user 0.140000 sys 0.000000 (median of 73) revision: medium amount; added files: medium amount; rename small amount; d343da0c55a8 d7746d32bf9d before: ! wall 0.036052 comb 0.030000 user 0.030000 sys 0.000000 (median of 100) after: ! wall 0.032558 comb 0.030000 user 0.030000 sys 0.000000 (median of 100) Differential Revision: https://phab.mercurial-scm.org/D7127
Tue, 15 Oct 2019 18:23:34 +0200 copies: move from a copy on branchpoint to a copy on write approach
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 15 Oct 2019 18:23:34 +0200] rev 43300
copies: move from a copy on branchpoint to a copy on write approach Before this changes, any branch points results in a copy of the dictionary containing the copy information. This can be very costly for branchy history with few rename information. Instead, we take a "copy on write" approach. Copying the input data only when we are about to update them. In practice we where already doing the copying in half of these case (because `_chain` makes a copy), so we don't add a significant cost here even in the linear case. However the speed up in branchy case is very significant. Here are some timing on the pypy repository. revision: large amount; added files: large amount; rename small amount; c3b14617fbd7 9ba6ab77fd29 before: ! wall 1.399863 comb 1.400000 user 1.370000 sys 0.030000 (median of 10) after: ! wall 0.766453 comb 0.770000 user 0.750000 sys 0.020000 (median of 11) revision: large amount; added files: small amount; rename small amount; c3b14617fbd7 f650a9b140d2 before: ! wall 1.876748 comb 1.890000 user 1.870000 sys 0.020000 (median of 10) after: ! wall 1.167223 comb 1.170000 user 1.150000 sys 0.020000 (median of 10) revision: large amount; added files: large amount; rename large amount; 08ea3258278e d9fa043f30c0 before: ! wall 0.242457 comb 0.240000 user 0.240000 sys 0.000000 (median of 39) after: ! wall 0.211476 comb 0.210000 user 0.210000 sys 0.000000 (median of 45) revision: small amount; added files: large amount; rename large amount; df6f7a526b60 a83dc6a2d56f before: ! wall 0.013193 comb 0.020000 user 0.020000 sys 0.000000 (median of 224) after: ! wall 0.013290 comb 0.010000 user 0.010000 sys 0.000000 (median of 222) revision: small amount; added files: large amount; rename small amount; 4aa4e1f8e19a 169138063d63 before: ! wall 0.001673 comb 0.000000 user 0.000000 sys 0.000000 (median of 1000) after: ! wall 0.001677 comb 0.000000 user 0.000000 sys 0.000000 (median of 1000) revision: small amount; added files: small amount; rename small amount; 4bc173b045a6 964879152e2e before: ! wall 0.000119 comb 0.000000 user 0.000000 sys 0.000000 (median of 8023) after: ! wall 0.000119 comb 0.000000 user 0.000000 sys 0.000000 (median of 7997) revision: medium amount; added files: large amount; rename medium amount; c95f1ced15f2 2c68e87c3efe before: ! wall 0.201898 comb 0.210000 user 0.200000 sys 0.010000 (median of 48) after: ! wall 0.167415 comb 0.170000 user 0.160000 sys 0.010000 (median of 58) revision: medium amount; added files: medium amount; rename small amount; d343da0c55a8 d7746d32bf9d before: ! wall 0.036820 comb 0.040000 user 0.040000 sys 0.000000 (median of 100) after: ! wall 0.035797 comb 0.040000 user 0.040000 sys 0.000000 (median of 100) The extra cost in the linear case can be reclaimed later with some extra logic. Differential Revision: https://phab.mercurial-scm.org/D7124
Sat, 12 Oct 2019 18:35:14 +0200 copies: compute the exact set of revision to walk
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 12 Oct 2019 18:35:14 +0200] rev 43299
copies: compute the exact set of revision to walk This change make the code clearer by removing the revision queue. It comes without very noticeable performance impact. However the simpler code will be easier to update in later changesets. revision: large amount; added files: large amount; rename small amount; c3b14617fbd7 9ba6ab77fd29 before: ! wall 1.430082 comb 1.430000 user 1.390000 sys 0.040000 (median of 10) after: ! wall 1.405192 comb 1.410000 user 1.390000 sys 0.020000 (median of 10) revision: large amount; added files: small amount; rename small amount; c3b14617fbd7 f650a9b140d2 before: ! wall 1.971366 comb 1.970000 user 1.950000 sys 0.020000 (median of 10) after: ! wall 1.892541 comb 1.890000 user 1.870000 sys 0.020000 (median of 10) revision: large amount; added files: large amount; rename large amount; 08ea3258278e d9fa043f30c0 before: ! wall 0.252594 comb 0.250000 user 0.240000 sys 0.010000 (median of 38) after: ! wall 0.240075 comb 0.240000 user 0.240000 sys 0.000000 (median of 40) revision: small amount; added files: large amount; rename large amount; df6f7a526b60 a83dc6a2d56f before: ! wall 0.013100 comb 0.010000 user 0.010000 sys 0.000000 (median of 226) after: ! wall 0.013247 comb 0.010000 user 0.010000 sys 0.000000 (median of 223) revision: small amount; added files: large amount; rename small amount; 4aa4e1f8e19a 169138063d63 before: ! wall 0.001633 comb 0.000000 user 0.000000 sys 0.000000 (median of 1000) after: ! wall 0.001670 comb 0.000000 user 0.000000 sys 0.000000 (median of 1000) revision: small amount; added files: small amount; rename small amount; 4bc173b045a6 964879152e2e before: ! wall 0.000078 comb 0.000000 user 0.000000 sys 0.000000 (median of 11984) after: ! wall 0.000119 comb 0.000000 user 0.000000 sys 0.000000 (median of 7982) revision: medium amount; added files: large amount; rename medium amount; c95f1ced15f2 2c68e87c3efe before: ! wall 0.207093 comb 0.210000 user 0.210000 sys 0.000000 (median of 47) after: ! wall 0.201551 comb 0.200000 user 0.200000 sys 0.000000 (median of 48) revision: medium amount; added files: medium amount; rename small amount; d343da0c55a8 d7746d32bf9d before: ! wall 0.038462 comb 0.040000 user 0.040000 sys 0.000000 (median of 100) after: ! wall 0.036578 comb 0.030000 user 0.030000 sys 0.000000 (median of 100) Differential Revision: https://phab.mercurial-scm.org/D7076
Sat, 12 Oct 2019 17:53:29 +0200 copies: add an explicit test using multiple roots
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 12 Oct 2019 17:53:29 +0200] rev 43298
copies: add an explicit test using multiple roots We explicitly add a test checking for copies of connected revision but involving a different roots. This make sure the copies coming purely from the new roots does not interfere with the merge. Differential Revision: https://phab.mercurial-scm.org/D7075
Wed, 02 Oct 2019 18:16:02 -0400 sidedatacopies: fast path data fetching if revision has no sidedata
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 02 Oct 2019 18:16:02 -0400] rev 43297
sidedatacopies: fast path data fetching if revision has no sidedata When using the side data mode, we know their won't be any copy information sidedata. Skipping revision restoration give an important speed boost. In the future, there will be other user of sidedata, reducing the efficiency of this. We should consider adding a dedicated flag in revlog V2 to preserve this optimisation. The current situation is good enough for now. revision: large amount; added files: large amount; rename small amount; c3b14617fbd7 9ba6ab77fd29 before: ! wall 2.401569 comb 2.400000 user 2.390000 sys 0.010000 (median of 10) after: ! wall 1.429294 comb 1.430000 user 1.410000 sys 0.020000 (median of 10) revision: large amount; added files: small amount; rename small amount; c3b14617fbd7 f650a9b140d2 before: ! wall 3.519140 comb 3.520000 user 3.470000 sys 0.050000 (median of 10) after: ! wall 1.963332 comb 1.960000 user 1.960000 sys 0.000000 (median of 10) revision: large amount; added files: large amount; rename large amount; 08ea3258278e d9fa043f30c0 before: ! wall 0.593880 comb 0.600000 user 0.590000 sys 0.010000 (median of 15) after: ! wall 0.251679 comb 0.250000 user 0.250000 sys 0.000000 (median of 38) revision: small amount; added files: large amount; rename large amount; df6f7a526b60 a83dc6a2d56f before: ! wall 0.013414 comb 0.020000 user 0.020000 sys 0.000000 (median of 220) after: ! wall 0.013222 comb 0.020000 user 0.020000 sys 0.000000 (median of 223) revision: small amount; added files: large amount; rename small amount; 4aa4e1f8e19a 169138063d63 before: ! wall 0.002711 comb 0.000000 user 0.000000 sys 0.000000 (median of 1000) after: ! wall 0.001631 comb 0.000000 user 0.000000 sys 0.000000 (median of 1000) revision: small amount; added files: small amount; rename small amount; 4bc173b045a6 964879152e2e before: ! wall 0.000077 comb 0.000000 user 0.000000 sys 0.000000 (median of 12208) after: ! wall 0.000078 comb 0.000000 user 0.000000 sys 0.000000 (median of 12012) revision: medium amount; added files: large amount; rename medium amount; c95f1ced15f2 2c68e87c3efe before: ! wall 0.410067 comb 0.410000 user 0.410000 sys 0.000000 (median of 23) after: ! wall 0.207786 comb 0.200000 user 0.200000 sys 0.000000 (median of 46) revision: medium amount; added files: medium amount; rename small amount; d343da0c55a8 d7746d32bf9d before: ! wall 0.097004 comb 0.090000 user 0.090000 sys 0.000000 (median of 100) after: ! wall 0.038495 comb 0.030000 user 0.030000 sys 0.000000 (median of 100) Differential Revision: https://phab.mercurial-scm.org/D7074
Fri, 18 Oct 2019 15:16:57 -0700 largefiles: use context manager for setting "lfstatus" on subrepos too
Martin von Zweigbergk <martinvonz@google.com> [Fri, 18 Oct 2019 15:16:57 -0700] rev 43296
largefiles: use context manager for setting "lfstatus" on subrepos too It's safe since we now reset to the previous value. Differential Revision: https://phab.mercurial-scm.org/D7138
Fri, 18 Oct 2019 15:14:51 -0700 largefiles: reset "lfstatus" attribute to previous value in "finally"
Martin von Zweigbergk <martinvonz@google.com> [Fri, 18 Oct 2019 15:14:51 -0700] rev 43295
largefiles: reset "lfstatus" attribute to previous value in "finally" We were resetting it to False, which means nesting of these overrides would be incorrect. Differential Revision: https://phab.mercurial-scm.org/D7137
Fri, 18 Oct 2019 14:40:50 -0700 largefiles: add context manager for setting/clearing "lfstatus" attribute
Martin von Zweigbergk <martinvonz@google.com> [Fri, 18 Oct 2019 14:40:50 -0700] rev 43294
largefiles: add context manager for setting/clearing "lfstatus" attribute Differential Revision: https://phab.mercurial-scm.org/D7136
Fri, 18 Oct 2019 16:51:26 +0200 py3: adjust expected traceback in test-hook.t
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 18 Oct 2019 16:51:26 +0200] rev 43293
py3: adjust expected traceback in test-hook.t In Python 3, traceback.format_exception() displays the chain of exceptions so we get extra results from our grep. Also, ModuleNotFoundError is raised instead of ImportError from Python 3.6.
Fri, 18 Oct 2019 16:38:37 +0200 tests: use non-reverse grep in traceback in test-hook.t
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 18 Oct 2019 16:38:37 +0200] rev 43292
tests: use non-reverse grep in traceback in test-hook.t This will prepare for updating test output for Python 3.
Fri, 18 Oct 2019 11:44:44 +0200 py3: add Python 3 exception output to test-hook.t
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 18 Oct 2019 11:44:44 +0200] rev 43291
py3: add Python 3 exception output to test-hook.t This is similar to, e.g., 3e9c6cef949b.
Fri, 18 Oct 2019 12:12:56 +0200 py3: ajust abort message in test-hook.t
Denis Laxalde <denis.laxalde@logilab.fr> [Fri, 18 Oct 2019 12:12:56 +0200] rev 43290
py3: ajust abort message in test-hook.t
Mon, 14 Oct 2019 16:15:19 +0900 rust-cpython: prepare for writing tests that require libpython
Yuya Nishihara <yuya@tcha.org> [Mon, 14 Oct 2019 16:15:19 +0900] rev 43289
rust-cpython: prepare for writing tests that require libpython What I wanted is to disable the "cpython/extension-module<ver>" feature while building tests executable, but that seems not doable. Instead, this patch adds new features dedicated for tests. The make rule is extracted so that we can easily run cargo tests. Added a minimal test of ref-sharing as an example. More tests will follow.
Sat, 05 Oct 2019 10:21:34 -0400 rust-cpython: make inner functions and structs of ref_sharing private
Yuya Nishihara <yuya@tcha.org> [Sat, 05 Oct 2019 10:21:34 -0400] rev 43288
rust-cpython: make inner functions and structs of ref_sharing private Most of these methods were public because they had to be accessible from macro-generated functions. Some "unsafe" can be removed since we can guarantee the data consistency across non-public operations.
Sat, 21 Sep 2019 17:05:01 +0900 rust-cpython: keep Python<'a> token in PyRefMut
Yuya Nishihara <yuya@tcha.org> [Sat, 21 Sep 2019 17:05:01 +0900] rev 43287
rust-cpython: keep Python<'a> token in PyRefMut This just clarifies that the GIL is obtained while PyRefMut is dereferenced, so there's no need of extra acquire_gil() to drop the reference.
Sat, 21 Sep 2019 17:15:50 +0900 rust-cpython: require GIL to borrow immutable reference from PySharedRefCell
Yuya Nishihara <yuya@tcha.org> [Sat, 21 Sep 2019 17:15:50 +0900] rev 43286
rust-cpython: require GIL to borrow immutable reference from PySharedRefCell Since the inner value may be leaked, we probably need GIL to guarantee that there's no data race. inner(py).borrow() is replaced with inner_shared(py).borrow(), which basically means any PySharedRefCell data should be accessed through PySharedRef wrapper.
Sun, 15 Sep 2019 22:19:10 +0900 rust-cpython: make PyLeakedRef operations relatively safe
Yuya Nishihara <yuya@tcha.org> [Sun, 15 Sep 2019 22:19:10 +0900] rev 43285
rust-cpython: make PyLeakedRef operations relatively safe This patch encapsulates the access to the leaked reference to make most leaked-ref operations safe. The only exception is leaked_ref.map(). I couldn't figure out how to allow arbitrary map operation safely over an unsafe static reference. See the docstring and inline comment for details. Now leak_immutable() can be safely implemented as the PyLeakedRef owns its inner data.
Sun, 15 Sep 2019 22:06:19 +0900 rust-cpython: put leaked reference in PyLeakedRef
Yuya Nishihara <yuya@tcha.org> [Sun, 15 Sep 2019 22:06:19 +0900] rev 43284
rust-cpython: put leaked reference in PyLeakedRef The next patch will make PyLeakedRef manage the lifetime of the underlying object. leak_handle.data.take() will be removed soon.
Thu, 17 Oct 2019 20:40:12 -0700 run-tests: make code coverage work on Python 3
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 17 Oct 2019 20:40:12 -0700] rev 43283
run-tests: make code coverage work on Python 3 This code path was obviously not tested on Python 3 because it blew up in several places due to str/bytes mismatch. For internal code, we normalize paths to bytes. For code calling into `coverage`, we normalize paths to str, which is what `coverage` seems to expect. After this, `run-tests.py -H` works on Python 3! Differential Revision: https://phab.mercurial-scm.org/D7133
Thu, 17 Oct 2019 22:40:24 +0100 py3: don't index into bytes in phabricator's _tokenize()
Ian Moody <moz-ian@perix.co.uk> [Thu, 17 Oct 2019 22:40:24 +0100] rev 43282
py3: don't index into bytes in phabricator's _tokenize() `phabread`ing a stack using `hg phabread :D1234` under py3 will currently die with a KeyError because it will index into `b':D1234'` and return `58` instead of `b':'` as a token. Differential Revision: https://phab.mercurial-scm.org/D7129
Thu, 17 Oct 2019 14:20:11 +0200 rust-dirstate-status: use fast-path even with fsmonitor and sparse extensions
Raphaël Gomès <rgomes@octobus.net> [Thu, 17 Oct 2019 14:20:11 +0200] rev 43281
rust-dirstate-status: use fast-path even with fsmonitor and sparse extensions When I initially ran the tests on my series, there were test failures related to those extensions. Now that the initial series has landed, I felt like going back to those issues because people with performance issues will often want to use fsmonitor and sparse. Either because of flaky tests or because the series has changed so much, I can't seem to reproduce these issues... let's widen the scope of the fast-path. Differential Revision: https://phab.mercurial-scm.org/D7128
Wed, 16 Oct 2019 10:14:26 +0200 rust-dirstatemap: remove additional lookups in dirstatemap
Raphaël Gomès <rgomes@octobus.net> [Wed, 16 Oct 2019 10:14:26 +0200] rev 43280
rust-dirstatemap: remove additional lookups in dirstatemap We're copying this shortcut from the Python implementation, pretty standard for this codebase. Differential Revision: https://phab.mercurial-scm.org/D7117
Thu, 17 Oct 2019 21:37:21 +0200 tests: avoid chmod on windows in hgrc tests
Denis Laxalde <denis@laxalde.org> [Thu, 17 Oct 2019 21:37:21 +0200] rev 43279
tests: avoid chmod on windows in hgrc tests Follow up on changeset d201a637c971 introducing this test, which fails on Windows.
Thu, 17 Oct 2019 13:34:21 +0200 py3: fix sorting of obsolete markers during push
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 17 Oct 2019 13:34:21 +0200] rev 43278
py3: fix sorting of obsolete markers during push This fixes similar errors as in 01e8eefd9434: TypeError: '<' not supported between instances of 'NoneType' and 'tuple'
Thu, 17 Oct 2019 13:30:58 +0200 exchange: extract a function to sort obsolete markers
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 17 Oct 2019 13:30:58 +0200] rev 43277
exchange: extract a function to sort obsolete markers Follows up on changeset 01e8eefd9434, several other occurrences of sorted() need to be fixed. The _sortedmarkers() handles sorting obsmarkers with a None value as last element on Python 3.
Thu, 17 Oct 2019 12:10:42 +0200 py3: encode underlying error message during parse error of %include
Denis Laxalde <denis.laxalde@logilab.fr> [Thu, 17 Oct 2019 12:10:42 +0200] rev 43276
py3: encode underlying error message during parse error of %include
Fri, 11 Oct 2019 18:08:50 +0100 convert: convert os.devnull to bytes before trying to join it with other bytes
Ian Moody <moz-ian@perix.co.uk> [Fri, 11 Oct 2019 18:08:50 +0100] rev 43275
convert: convert os.devnull to bytes before trying to join it with other bytes Together with the previous commit relating to emailparser this gets test-convert-tla.t passing under py3. Differential Revision: https://phab.mercurial-scm.org/D7062
Wed, 16 Oct 2019 20:34:56 +0200 rust-dirstate-status: add call to rust-fast path for `dirstate.status`
Raphaël Gomès <rgomes@octobus.net> [Wed, 16 Oct 2019 20:34:56 +0200] rev 43274
rust-dirstate-status: add call to rust-fast path for `dirstate.status` The reasoning behind this patch is explained in the first patch of the series. Differential Revision: https://phab.mercurial-scm.org/D7060
Tue, 08 Oct 2019 08:45:55 +0200 rust-dirstate-status: rust-cpython bindings for `dirstate.status`
Raphaël Gomès <rgomes@octobus.net> [Tue, 08 Oct 2019 08:45:55 +0200] rev 43273
rust-dirstate-status: rust-cpython bindings for `dirstate.status` The ref-sharing mechanism has improved, but its ergonomics still left a bit to be desired, as expected. Differential Revision: https://phab.mercurial-scm.org/D7059
Tue, 15 Oct 2019 21:26:56 +0200 rust-refsharing: add missing lifetime parameter in ref_sharing
Raphaël Gomès <rgomes@octobus.net> [Tue, 15 Oct 2019 21:26:56 +0200] rev 43272
rust-refsharing: add missing lifetime parameter in ref_sharing Differential Revision: https://phab.mercurial-scm.org/D7110
Fri, 11 Oct 2019 13:39:57 +0200 rust-dirstate-status: add first Rust implementation of `dirstate.status`
Raphaël Gomès <rgomes@octobus.net> [Fri, 11 Oct 2019 13:39:57 +0200] rev 43271
rust-dirstate-status: add first Rust implementation of `dirstate.status` Note: This patch also added the rayon crate as a Cargo dependency. It will help us immensely in making Rust code parallel and easy to maintain. It is a stable, well-known, and supported crate maintained by people on the Rust team. The current `dirstate.status` method has grown over the years through bug reports and new features to the point where it got too big and too complex. This series does not yet improve the logic, but adds a Rust fast-path to speed up certain cases. Tested on mozilla-try-2019-02-18 with zstd compression: - `hg diff` on an empty working copy: - c: 1.64(+-)0.04s - rust+c before this change: 2.84(+-)0.1s - rust+c: 849(+-)40ms - `hg commit` when creating a file: - c: 5.960s - rust+c before this change: 5.828s - rust+c: 4.668s - `hg commit` when updating a file: - c: 4.866s - rust+c before this change: 4.371s - rust+c: 3.855s - `hg status -mard` - c: 1.82(+-)0.04s - rust+c before this change: 2.64(+-)0.1s - rust+c: 896(+-)30ms The numbers are clear: the current Rust `dirstatemap` implementation is super slow, its performance needs to be addressed. This will be done in a future series, immediately after this one, with the goal of getting Rust to be at least to the speed of the Python + C implementation in all cases before the 5.2 freeze. At worse, we gate dirstatemap to only be used in those cases. Cases where the fast-path is not executed: - for commands that need ignore support (`status`, for example) - if subrepos are found (should not be hard to add, but winter is coming) - any other matcher than an `alwaysmatcher`, like patterns, etc. - with extensions like `sparse` and `fsmonitor` The next step after this is to rethink the logic to be closer to Jane Street's Valentin Gatien-Baron's Rust fast-path which does a lot less work when possible. Differential Revision: https://phab.mercurial-scm.org/D7058
Sun, 06 Oct 2019 20:18:54 +0300 share: unmark --relative as EXPERIMENTAL
Pulkit Goyal <pulkit@yandex-team.ru> [Sun, 06 Oct 2019 20:18:54 +0300] rev 43270
share: unmark --relative as EXPERIMENTAL Differential Revision: https://phab.mercurial-scm.org/D7001
Mon, 30 Sep 2019 16:31:53 -0400 rust-cpython: removed now useless py_set() conversion
Georges Racinet <georges.racinet@octobus.net> [Mon, 30 Sep 2019 16:31:53 -0400] rev 43269
rust-cpython: removed now useless py_set() conversion In rust-cpython 0.3.0, HashSets implement the appropriate ToPythonObject, we can therefore get rid of this hacky conversion. There still remains an inefficiency in `MissingAncestors.bases()`: we have to clone, because `to_py_object()` requires full ownership. However: - the only use case outside of unit tests used to be from `setdiscovery.partialdiscovery` which is now fully implemented in Rust. - it's not worse than what `py_set()` used to do Differential Revision: https://phab.mercurial-scm.org/D7120
Tue, 15 Oct 2019 22:02:34 -0400 tests: stabilize test-eol-update on Windows
Matt Harbison <matt_harbison@yahoo.com> [Tue, 15 Oct 2019 22:02:34 -0400] rev 43268
tests: stabilize test-eol-update on Windows These appeared in the recent eol fix series. I'm not sure about the identity mismatch warning- it seems like a general timing issue, because it happened on the first run but not when run with `--loop`. The buildbot also flagged this. Differential Revision: https://phab.mercurial-scm.org/D7112
Tue, 15 Oct 2019 21:51:37 -0400 tests: opt into python3 when testing virtualenv installation
Matt Harbison <matt_harbison@yahoo.com> [Tue, 15 Oct 2019 21:51:37 -0400] rev 43267
tests: opt into python3 when testing virtualenv installation Otherwise it complains that Mercurial requires '~=2.7'. Since the existing linux py3 test doesn't flag this, I'm assuming that virtualenv simply isn't installed on that system. Differential Revision: https://phab.mercurial-scm.org/D7111
Sun, 06 Oct 2019 15:17:34 +0530 grep: put --diff in the first line of usage
Navaneeth Suresh <navaneeths1998@gmail.com> [Sun, 06 Oct 2019 15:17:34 +0530] rev 43266
grep: put --diff in the first line of usage Differential Revision: https://phab.mercurial-scm.org/D7003
Thu, 12 Sep 2019 03:40:54 +0200 ui: option to preserve the progress bar
Joerg Sonnenberger <joerg@bec.de> [Thu, 12 Sep 2019 03:40:54 +0200] rev 43265
ui: option to preserve the progress bar Some interface like the fast-import format of git are meant for pipe processing. It can be still desirable to have progress bars in this case, but clearing the bar after each output operation is not desirable. Differential Revision: https://phab.mercurial-scm.org/D6843
Thu, 10 Oct 2019 22:11:39 +0100 phabricator: update hgmatcher to cope with the new data format
Ian Moody <moz-ian@perix.co.uk> [Thu, 10 Oct 2019 22:11:39 +0100] rev 43264
phabricator: update hgmatcher to cope with the new data format The new conduit format can't be matched by the existing matcher since it shifts all the data into an urlencoded string of JSON, the order of which isn't stable between runs. Instead detect JSON values of params and load them into python dicts, which python will then naturally deep-equal compare. Differential Revision: https://phab.mercurial-scm.org/D7055
(0) -30000 -10000 -3000 -1000 -120 +120 +1000 +3000 tip