Wed, 14 Oct 2020 17:52:18 +0200 procutil: allow to specify arbitrary stdin bytes to runbgcommand
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Oct 2020 17:52:18 +0200] rev 45786
procutil: allow to specify arbitrary stdin bytes to runbgcommand For automatic clonebundles generation I need to pass arbitrary large amount of data to the process (eg: common nodes, target nodes). I am updating the `runbgcommand` to allow for this. Previously not stdin input was possible, now, one can provide raw bytes and they will be feed to the command through an unnamed temporary files. Differential Revision: https://phab.mercurial-scm.org/D9212
Wed, 14 Oct 2020 17:46:28 +0200 clonebundle: move the manifest filename to a constant
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Oct 2020 17:46:28 +0200] rev 45785
clonebundle: move the manifest filename to a constant I am about to add more reference to it, so I would rather have it an explicit constant. This allow to unify various call too. Differential Revision: https://phab.mercurial-scm.org/D9209
Thu, 15 Oct 2020 15:57:36 +0200 clonebundles: move a bundle of clone bundle related code to a new module
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 15 Oct 2020 15:57:36 +0200] rev 45784
clonebundles: move a bundle of clone bundle related code to a new module In the process on general clone bundle automatically, we need to make some function available more widely. This is a good opportunity to extract a significant amount of code from `mercurial.exchange` into a new `mercurial.bundlecaches`. This make `mercurial.exchange` move under the 3K line range (hooray…). The module is called `bundlecaches` because I expect it to be eventually useful for more than just clone bundle (like pull bunbles). Differential Revision: https://phab.mercurial-scm.org/D9208
Wed, 01 Jul 2020 15:14:59 +0530 config: add a .hg/hgrc-not-shared which won't be shared in share-safe mode
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 01 Jul 2020 15:14:59 +0530] rev 45783
config: add a .hg/hgrc-not-shared which won't be shared in share-safe mode Previous patches add a safe mode for sharing repositories which involve sharing of source requirements and config files. In certain situations we might need to add a config to source repository which we does not want to share. For this, we add a `.hg/hgrc-not-shared` which won't be shared. This also adds a `--non-shared` flag to `hg config` command to see the non-shared config. Differential Revision: https://phab.mercurial-scm.org/D8673
Fri, 18 Sep 2020 18:52:38 +0530 dispatch: load shared source repository config in share-safe mode
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 18 Sep 2020 18:52:38 +0530] rev 45782
dispatch: load shared source repository config in share-safe mode It seems to me now that there are two steps when config is loaded: 1) on dispatch 2) repository object creation Recent patches added functionality that there can be shares in share-safe mode where config of the source repository is shared with the the shares. However we missed adding logic to read the source config on dispatch. This leads to extensions not being loaded on dispatch and hence extensions command not being recognized. This patch fixes it by reading the shared source config on dispatch. Differential Revision: https://phab.mercurial-scm.org/D9047
Fri, 18 Sep 2020 17:28:22 +0530 tests: add test showing broken extension loading in case of share-safe
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 18 Sep 2020 17:28:22 +0530] rev 45781
tests: add test showing broken extension loading in case of share-safe When we are using share-safe and loading source repository config, we are still not loading the extensions which are enabled in the source repository. This patch demonstrates the bug. Meanwhile it also shows how unreliable `hg debugextensions` is. Differential Revision: https://phab.mercurial-scm.org/D9046
Fri, 09 Oct 2020 10:33:19 +0200 dirstate-tree: simplify the control flow in the Node.insert method
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 09 Oct 2020 10:33:19 +0200] rev 45780
dirstate-tree: simplify the control flow in the Node.insert method But explicitly with the special case early, laying out the various case become simpler. (The initial motivation was to make some future lifetime error simpler). Differential Revision: https://phab.mercurial-scm.org/D9203
Wed, 21 Oct 2020 01:48:09 +0200 revlog: use LRU for the chain cache
Joerg Sonnenberger <joerg@bec.de> [Wed, 21 Oct 2020 01:48:09 +0200] rev 45779
revlog: use LRU for the chain cache For a large repository, this reduces the number of filelog instances and associated data a lot. For a 1% speed penalty, it reduces peak RSS by 20% for the full NetBSD test repository. Differential Revision: https://phab.mercurial-scm.org/D9235
Wed, 14 Oct 2020 08:38:58 -0700 tests: add notes about broken `hg log --follow <file>` with copies in extras
Martin von Zweigbergk <martinvonz@google.com> [Wed, 14 Oct 2020 08:38:58 -0700] rev 45778
tests: add notes about broken `hg log --follow <file>` with copies in extras I also removed some unnecessary `#if no-changeset` where the `#else` was the same :P Differential Revision: https://phab.mercurial-scm.org/D9204
Thu, 22 Oct 2020 10:57:11 -0700 config: move message about leading spaces in config to config.py
Martin von Zweigbergk <martinvonz@google.com> [Thu, 22 Oct 2020 10:57:11 -0700] rev 45777
config: move message about leading spaces in config to config.py When the config parser raises a ParseError, it uses the line that failed to parse as the error message. It doesn't currently tell the user anything about why it failed to parse. b13b99d39a46 (config: highlight parse error caused by leading spaces (issue3214), 2014-03-16) added a checked based on the error *message* having leading spaces. That has worked fine because only the config parser uses the line itself as error message (I think the revset and fileset parsers use more user-friendly proper messages). It still feels like a hack. Let's make the config parser give a useful message about leading whitespace instead. We should ideally follow up with more useful messages for other parse errors in config files. Differential Revision: https://phab.mercurial-scm.org/D9241
Thu, 22 Oct 2020 09:58:05 -0700 errors: name arguments to ParseError constructor
Martin von Zweigbergk <martinvonz@google.com> [Thu, 22 Oct 2020 09:58:05 -0700] rev 45776
errors: name arguments to ParseError constructor As with similar previous patches, this is to improve readability. Differential Revision: https://phab.mercurial-scm.org/D9240
Tue, 20 Oct 2020 08:58:20 -0700 errors: remove unnecessary override of __bytes__ in RevlogError
Martin von Zweigbergk <martinvonz@google.com> [Tue, 20 Oct 2020 08:58:20 -0700] rev 45775
errors: remove unnecessary override of __bytes__ in RevlogError StorageError already provides the same definition. Differential Revision: https://phab.mercurial-scm.org/D9234
Thu, 15 Oct 2020 22:23:02 -0700 commit: leverage cmdutil.check_incompatible_arguments()
Martin von Zweigbergk <martinvonz@google.com> [Thu, 15 Oct 2020 22:23:02 -0700] rev 45774
commit: leverage cmdutil.check_incompatible_arguments() Differential Revision: https://phab.mercurial-scm.org/D9218
Tue, 27 Oct 2020 10:06:17 -0700 split: use default one-line summary
Martin von Zweigbergk <martinvonz@google.com> [Tue, 27 Oct 2020 10:06:17 -0700] rev 45773
split: use default one-line summary Differential Revision: https://phab.mercurial-scm.org/D9255
Tue, 27 Oct 2020 10:22:36 -0700 phabsend: use default one-line summary
Martin von Zweigbergk <martinvonz@google.com> [Tue, 27 Oct 2020 10:22:36 -0700] rev 45772
phabsend: use default one-line summary This means that the `phabricator.node` and `phabricator.desc` color configs will no longer be respected, but `log.changeset` and `log.desc` will be respected instead. Differential Revision: https://phab.mercurial-scm.org/D9254
Tue, 27 Oct 2020 15:33:15 -0700 rebase: change and standarize template for rebase's one-line summary
Martin von Zweigbergk <martinvonz@google.com> [Tue, 27 Oct 2020 15:33:15 -0700] rev 45771
rebase: change and standarize template for rebase's one-line summary This removes the default template in rebase and switches to a centrally defined template. I've simplified it a bit to avoid the conditional parenthesis. I've also added labels so the different parts can be easily colored. The template is somewhat similar to what we've used internally at Google for a few years. I'm happy to change the template if others have opinions. Should we reuse the `color.log.` names as I have? Differential Revision: https://phab.mercurial-scm.org/D9252
Thu, 22 Oct 2020 23:10:06 -0700 rebase: make summary template configurable, with default to shared template
Martin von Zweigbergk <martinvonz@google.com> [Thu, 22 Oct 2020 23:10:06 -0700] rev 45770
rebase: make summary template configurable, with default to shared template Differential Revision: https://phab.mercurial-scm.org/D9251
Thu, 22 Oct 2020 22:29:22 -0700 rebase: use hard-coded template for one-line commit description
Martin von Zweigbergk <martinvonz@google.com> [Thu, 22 Oct 2020 22:29:22 -0700] rev 45769
rebase: use hard-coded template for one-line commit description This is to prepare for making making the one-line summary customizable. The template ended up pretty complicated because of the conditional output of "(<bookmarks etc>)". Maybe we can simplify the template later. Differential Revision: https://phab.mercurial-scm.org/D9250
Mon, 26 Oct 2020 10:33:32 -0700 config: move ui.pre-merge-tool-output-template into [command-templates]
Martin von Zweigbergk <martinvonz@google.com> [Mon, 26 Oct 2020 10:33:32 -0700] rev 45768
config: move ui.pre-merge-tool-output-template into [command-templates] Differential Revision: https://phab.mercurial-scm.org/D9249
Fri, 23 Oct 2020 15:59:32 -0700 config: rename ui.mergemarkertemplate to command-templates.mergemarker
Martin von Zweigbergk <martinvonz@google.com> [Fri, 23 Oct 2020 15:59:32 -0700] rev 45767
config: rename ui.mergemarkertemplate to command-templates.mergemarker Differential Revision: https://phab.mercurial-scm.org/D9247
Fri, 23 Oct 2020 15:27:33 -0700 config: rename ui.graphnodetemplate to command-templates.graphnode
Martin von Zweigbergk <martinvonz@google.com> [Fri, 23 Oct 2020 15:27:33 -0700] rev 45766
config: rename ui.graphnodetemplate to command-templates.graphnode Differential Revision: https://phab.mercurial-scm.org/D9246
Fri, 23 Oct 2020 10:56:18 -0700 config: add a new [command-templates] section for templates defined by hg
Martin von Zweigbergk <martinvonz@google.com> [Fri, 23 Oct 2020 10:56:18 -0700] rev 45765
config: add a new [command-templates] section for templates defined by hg The existing `[templates]` section lets the user define their own keys and then refer to them on the command line with `-T`. There are many cases where hg wants to use a user-defined template with a given name, such as `ui.logtemplate` and `ui.mergemarkertemplate`. This patch starts moving such configs in a common section by moving `ui.logtemplate` to `command-templates.log` (with an alias from the old name, of course). Differential Revision: https://phab.mercurial-scm.org/D9245
Thu, 29 Oct 2020 11:12:25 +0100 i18n: fix coding tag unsupported by xgettext stable 5.6
Dan Villiom Podlaski Christiansen <danchr@gmail.com> [Thu, 29 Oct 2020 11:12:25 +0100] rev 45764
i18n: fix coding tag unsupported by xgettext Running `make update-pot` currently fails with the following error: xgettext: mercurial/metadata.py:1: Unknown encoding "utf8". Proceeding with ASCII instead. xgettext: Non-ASCII string at mercurial/metadata.py:311. Please specify the source encoding through --from-code or through a comment as specified in http://www.python.org/peps/pep-0263.html. Differential Revision: https://phab.mercurial-scm.org/D9260
Thu, 29 Oct 2020 11:11:54 +0100 py3: hggettext stable
Dan Villiom Podlaski Christiansen <danchr@gmail.com> [Thu, 29 Oct 2020 11:11:54 +0100] rev 45763
py3: hggettext `itervalues()` is only available on Python 2. Since this script doesn't currently refer to the main Mercurial modules, and as a result doesn't have easy access to the `pycompat` module, I simply changed it to use `value()` instead. Although this allocates a list on Python 2, I'd consider that acceptable for a utility script; Mercurial doesn't have all _that_ many commands anyway. Differential Revision: https://phab.mercurial-scm.org/D9259
Thu, 29 Oct 2020 11:37:22 -0700 relnotes: copy "next" to "5.6" and clear "next" stable
Martin von Zweigbergk <martinvonz@google.com> [Thu, 29 Oct 2020 11:37:22 -0700] rev 45762
relnotes: copy "next" to "5.6" and clear "next" The same procedure as every year^Wcycle. Differential Revision: https://phab.mercurial-scm.org/D9263
Fri, 23 Oct 2020 22:20:08 -0400 repoview: only pin obsolete wdir parents while there are unresolved conflicts stable
Matt Harbison <matt_harbison@yahoo.com> [Fri, 23 Oct 2020 22:20:08 -0400] rev 45761
repoview: only pin obsolete wdir parents while there are unresolved conflicts I noticed after doing an update from an obsolete revision with a dirty wdir that the obsolete commit stayed visible for no obvious reason. It was decided in 85b03b1e4715 not to clear mergestate once all of the conflicts were resolved, in order to allow re-resolving. Since the point of pinning the obsolete parents was to allow resolving in the first place (aaeccdb6e654), it makes sense to also gate it on whether or not there are any remaining files to resolve. This might result in pinning again if files are marked unresolved again, but that seems reasonable, given that it still solves the original issue. Note that this isn't purely cosmetic- pushing with a pinned obsolete revision is likely to cause complaints about pushing multiple heads or other unexpected errors. So the faster it comes out of that state, the better. Differential Revision: https://phab.mercurial-scm.org/D9248
Wed, 28 Oct 2020 17:41:25 +0100 backout: don't assume that tip as what we just committed stable
Dan Villiom Podlaski Christiansen <danchr@gmail.com> [Wed, 28 Oct 2020 17:41:25 +0100] rev 45760
backout: don't assume that tip as what we just committed Differential Revision: https://phab.mercurial-scm.org/D9256
Fri, 23 Oct 2020 20:33:36 +0900 url: do not continue HTTP authentication with user=None (issue6425) stable
Yuya Nishihara <yuya@tcha.org> [Fri, 23 Oct 2020 20:33:36 +0900] rev 45759
url: do not continue HTTP authentication with user=None (issue6425) I initially thought this is a py3-compat bug of passwordmgr._writedebug(), but actually returning (None, str) pair is wrong at all. HTTP authentication would continue with user="None" in that case. Since registering a password of user=None should also be wrong, this patch simply adds early return.
Fri, 23 Oct 2020 20:10:17 +0900 ui: fix echo back of ui.prompt() to not concatenate None as bytes stable
Yuya Nishihara <yuya@tcha.org> [Fri, 23 Oct 2020 20:10:17 +0900] rev 45758
ui: fix echo back of ui.prompt() to not concatenate None as bytes Spotted while writing tests for the issue6425. The default value may be None.
Thu, 29 Oct 2020 07:51:13 +0100 commit: don't change phases for preexisting commits stable
Dan Villiom Podlaski Christiansen <danchr@gmail.com> [Thu, 29 Oct 2020 07:51:13 +0100] rev 45757
commit: don't change phases for preexisting commits I noticed when pulling with hg-git in a repository that already had the changes, but pulled from another Mercurial repository. This meant that hg-git would re-create exact matches of the changesets, and if they were public, they'd get reverted to drafts. Differential Revision: https://phab.mercurial-scm.org/D9253
Mon, 26 Oct 2020 10:08:22 -0700 branching: merge with stable
Martin von Zweigbergk <martinvonz@google.com> [Mon, 26 Oct 2020 10:08:22 -0700] rev 45756
branching: merge with stable
Thu, 22 Oct 2020 18:38:41 -0400 demandimport: don't raise AttributeError if `exec_module` is missing stable
Matt Harbison <matt_harbison@yahoo.com> [Thu, 22 Oct 2020 18:38:41 -0400] rev 45755
demandimport: don't raise AttributeError if `exec_module` is missing I assume this was meant to do the check gracefully. After shoveling a bunch of modules into the ignore list in order to get keyring to work out of the box on CentOS 8, I hit the following error accessing the password, which the change fixes. Now the SecretStorage backend works out of the box, without any edits to the ignore list. ** Unknown exception encountered with possibly-broken third-party extension mercurial_keyring ** which supports versions unknown of Mercurial. ** Please disable mercurial_keyring and try your action again. ** If that fixes the bug please report it to https://foss.heptapod.net/mercurial/mercurial_keyring/issues ** Python 3.6.8 (default, Apr 16 2020, 01:36:27) [GCC 8.3.1 20191121 (Red Hat 8.3.1-5)] ** Mercurial Distributed SCM (version 5.5.2) ** Extensions loaded: evolve, topic, rebase, absorb, mercurial_keyring Traceback (most recent call last): File "/home/mharbison/hg_py3.6.8_venv/lib64/python3.6/site-packages/mercurial_keyring.py", line 230, in _read_password_from_keyring password = keyring.get_password(KEYRING_SERVICE, pwdkey) File "/home/mharbison/hg_py3.6.8_venv/lib64/python3.6/site-packages/keyring/core.py", line 53, in get_password return _keyring_backend.get_password(service_name, username) File "/home/mharbison/hg_py3.6.8_venv/lib64/python3.6/site-packages/keyring/backends/chainer.py", line 51, in get_password password = keyring.get_password(service, username) File "/home/mharbison/hg_py3.6.8_venv/lib64/python3.6/site-packages/keyring/backends/SecretService.py", line 79, in get_password return item.get_secret().decode('utf-8') File "/home/mharbison/hg_py3.6.8_venv/lib64/python3.6/site-packages/secretstorage/item.py", line 105, in get_secret decryptor = Cipher(aes, modes.CBC(aes_iv), default_backend()).decryptor() File "/home/mharbison/hg_py3.6.8_venv/lib64/python3.6/site-packages/cryptography/hazmat/backends/__init__.py", line 15, in default_backend from cryptography.hazmat.backends.openssl.backend import backend File "<frozen importlib._bootstrap>", line 971, in _find_and_load File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 665, in _load_unlocked File "/home/mharbison/hg_py3.6.8_venv/lib64/python3.6/site-packages/hgdemandimport/demandimportpy3.py", line 53, in exec_module self.loader.exec_module(module) File "/home/mharbison/hg_py3.6.8_venv/lib64/python3.6/site-packages/cryptography/hazmat/backends/openssl/__init__.py", line 7, in <module> from cryptography.hazmat.backends.openssl.backend import backend File "<frozen importlib._bootstrap>", line 971, in _find_and_load File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 665, in _load_unlocked File "/home/mharbison/hg_py3.6.8_venv/lib64/python3.6/site-packages/hgdemandimport/demandimportpy3.py", line 53, in exec_module self.loader.exec_module(module) File "/home/mharbison/hg_py3.6.8_venv/lib64/python3.6/site-packages/cryptography/hazmat/backends/openssl/backend.py", line 14, in <module> from six.moves import range File "<frozen importlib._bootstrap>", line 971, in _find_and_load File "<frozen importlib._bootstrap>", line 951, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 894, in _find_spec File "/home/mharbison/hg_py3.6.8_venv/lib64/python3.6/site-packages/hgdemandimport/demandimportpy3.py", line 117, in find_spec and getattr(spec.loader, "exec_module") AttributeError: '_SixMetaPathImporter' object has no attribute 'exec_module' Differential Revision: https://phab.mercurial-scm.org/D9243
Thu, 22 Oct 2020 12:31:26 -0400 test: avoid bashisms in test-transaction-rollback-on-sigpipe.t stable
Mitchell Plamann <mplamann@janestreet.com> [Thu, 22 Oct 2020 12:31:26 -0400] rev 45754
test: avoid bashisms in test-transaction-rollback-on-sigpipe.t Differential Revision: https://phab.mercurial-scm.org/D9239
Wed, 21 Oct 2020 22:53:15 -0700 automation: upload Python 3.9 Windows wheels stable
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 21 Oct 2020 22:53:15 -0700] rev 45753
automation: upload Python 3.9 Windows wheels We are producing these. We should be publishing them.
Wed, 21 Oct 2020 21:53:19 -0700 contrib: split Windows requirements into multiple files stable
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 21 Oct 2020 21:53:19 -0700] rev 45752
contrib: split Windows requirements into multiple files Package support for Python 2 has diverged significantly. It is no longer trivial to maintain a single requirements file that supports both Python 2 and 3 because the set of packages and versions varies wildly. This commit split up the Windows requirements files so we have variants for Python 2 and 3. As part of this, I also renamed the files to have what I believe to be more reasonable naming ("win32" felt like a weird identifier to me). We can see that some package versions decreated on 2.7. This is because the old pinned versions weren't compatible with Python 2.
Sat, 17 Oct 2020 13:06:18 +0900 relnotes: add diffcontains() to new features list stable
Yuya Nishihara <yuya@tcha.org> [Sat, 17 Oct 2020 13:06:18 +0900] rev 45751
relnotes: add diffcontains() to new features list
Sat, 17 Oct 2020 13:00:04 +0900 revset: rename diff(pattern) to diffcontains(pattern) stable
Yuya Nishihara <yuya@tcha.org> [Sat, 17 Oct 2020 13:00:04 +0900] rev 45750
revset: rename diff(pattern) to diffcontains(pattern) Suggested by Augie, and I think it's better name.
Sun, 18 Oct 2020 22:48:00 -0700 pyoxidizer: update to PyOxidizer 0.9 stable
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 18 Oct 2020 22:48:00 -0700] rev 45749
pyoxidizer: update to PyOxidizer 0.9 We were previously using a Git commit from a few days before the 0.8 release. This commit upgrades us to the just-released 0.9 release. This required some Starlark changes due to backwards incompatible changes. Differential Revision: https://phab.mercurial-scm.org/D9228
Tue, 20 Oct 2020 22:06:30 +0530 Added signature for changeset 0e06a7ab9e0d stable
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 20 Oct 2020 22:06:30 +0530] rev 45748
Added signature for changeset 0e06a7ab9e0d
Tue, 20 Oct 2020 22:06:23 +0530 Added tag 5.6rc0 for changeset 0e06a7ab9e0d stable
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 20 Oct 2020 22:06:23 +0530] rev 45747
Added tag 5.6rc0 for changeset 0e06a7ab9e0d
Tue, 20 Oct 2020 22:04:04 +0530 merge with default for 5.6rc0 stable 5.6rc0
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 20 Oct 2020 22:04:04 +0530] rev 45746
merge with default for 5.6rc0
Thu, 15 Oct 2020 22:57:30 -0700 tag: leverage cmdutil.check_incompatible_arguments()
Martin von Zweigbergk <martinvonz@google.com> [Thu, 15 Oct 2020 22:57:30 -0700] rev 45745
tag: leverage cmdutil.check_incompatible_arguments() Differential Revision: https://phab.mercurial-scm.org/D9223
Thu, 15 Oct 2020 22:36:17 -0700 serve: leverage cmdutil.check_incompatible_arguments()
Martin von Zweigbergk <martinvonz@google.com> [Thu, 15 Oct 2020 22:36:17 -0700] rev 45744
serve: leverage cmdutil.check_incompatible_arguments() Differential Revision: https://phab.mercurial-scm.org/D9222
Thu, 15 Oct 2020 22:36:08 -0700 revert: leverage cmdutil.check_incompatible_arguments()
Martin von Zweigbergk <martinvonz@google.com> [Thu, 15 Oct 2020 22:36:08 -0700] rev 45743
revert: leverage cmdutil.check_incompatible_arguments() Differential Revision: https://phab.mercurial-scm.org/D9221
Thu, 15 Oct 2020 22:23:45 -0700 incoming: leverage cmdutil.check_incompatible_arguments()
Martin von Zweigbergk <martinvonz@google.com> [Thu, 15 Oct 2020 22:23:45 -0700] rev 45742
incoming: leverage cmdutil.check_incompatible_arguments() Differential Revision: https://phab.mercurial-scm.org/D9220
Thu, 15 Oct 2020 22:23:35 -0700 grep: levarage cmdutil.check_incompatible_arguments()
Martin von Zweigbergk <martinvonz@google.com> [Thu, 15 Oct 2020 22:23:35 -0700] rev 45741
grep: levarage cmdutil.check_incompatible_arguments() Differential Revision: https://phab.mercurial-scm.org/D9219
Thu, 15 Oct 2020 21:48:43 -0700 import: leverage cmdutil.check_incompatible_arguments()
Martin von Zweigbergk <martinvonz@google.com> [Thu, 15 Oct 2020 21:48:43 -0700] rev 45740
import: leverage cmdutil.check_incompatible_arguments() Differential Revision: https://phab.mercurial-scm.org/D9217
Thu, 15 Oct 2020 21:44:03 -0700 backout: leverage cmdutil.check_incompatible_arguments()
Martin von Zweigbergk <martinvonz@google.com> [Thu, 15 Oct 2020 21:44:03 -0700] rev 45739
backout: leverage cmdutil.check_incompatible_arguments() Differential Revision: https://phab.mercurial-scm.org/D9216
Mon, 12 Oct 2020 12:52:45 -0700 transaction: use ProgrammingError for when an committed transaction is used
Martin von Zweigbergk <martinvonz@google.com> [Mon, 12 Oct 2020 12:52:45 -0700] rev 45738
transaction: use ProgrammingError for when an committed transaction is used It seems to me that ProgrammingError is the right type of error here. Differential Revision: https://phab.mercurial-scm.org/D9215
Mon, 05 Oct 2020 17:18:39 -0400 hook: ignore EPIPE when flushing stdout/stderr
Mitchell Plamann <mplamann@janestreet.com> [Mon, 05 Oct 2020 17:18:39 -0400] rev 45737
hook: ignore EPIPE when flushing stdout/stderr This fixes the bug described in the parent commit. test-transaction-rollback-on-sigpipe.t is updated to show the new behavior. Differential Revision: https://phab.mercurial-scm.org/D9152
Mon, 05 Oct 2020 13:23:16 -0400 test: add test-transaction-rollback-on-sigpipe.t demonstrating py3 regression
Mitchell Plamann <mplamann@janestreet.com> [Mon, 05 Oct 2020 13:23:16 -0400] rev 45736
test: add test-transaction-rollback-on-sigpipe.t demonstrating py3 regression When an hg push is interrupted with C-c, the remote [hg serve] command receives SIGPIPE. If a pretxnchangegroup hook fails, the remote hg then tries to rollback the transaction. It begins by printing "transaction abort!\n". This returns EPIPE, but ui.py ignores that error. In python3 (but not python2), this "transaction abort!\n" message stays in a buffer, so future flushes of stderr will try to print the message again, and so those flushes will also hit EPIPE. This test demonstrates such a case where this EPIPE causes the transaction rollback to fail, leaving behind an abandoned transaction. Differential Revision: https://phab.mercurial-scm.org/D9151
Tue, 13 Oct 2020 05:14:37 +0200 upgrade: allow sidedata upgrade to modify revision flag
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 13 Oct 2020 05:14:37 +0200] rev 45735
upgrade: allow sidedata upgrade to modify revision flag In the process, we fix the lack of HAS_COPIES_INFO flag on upgrade, and test the results. Differential Revision: https://phab.mercurial-scm.org/D9199
Tue, 13 Oct 2020 03:30:49 +0200 sidedata: return enough data to set the proper flag in the future
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 13 Oct 2020 03:30:49 +0200] rev 45734
sidedata: return enough data to set the proper flag in the future If the revision has information relevant to copy tracing, we need to set a dedicated flag in revlog. Currently the upgrade process is failing to do so. Before we teach the upgrade process about flags, we make the information available where we will needs it. Differential Revision: https://phab.mercurial-scm.org/D9198
Tue, 13 Oct 2020 02:49:03 +0200 test: move upgrade run and check earlier in test-copies-chain-merge
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 13 Oct 2020 02:49:03 +0200] rev 45733
test: move upgrade run and check earlier in test-copies-chain-merge We are about to introduce an explicit case for copy tracing after a upgrade. So I am moving the code around beforehand for clarity. Differential Revision: https://phab.mercurial-scm.org/D9196
Tue, 13 Oct 2020 02:45:24 +0200 copies: split creation of the graph and actual checking again
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 13 Oct 2020 02:45:24 +0200] rev 45732
copies: split creation of the graph and actual checking again The re-install the old split. It will be necessary to test that the upgrade process produced a functionally identical result. It will be useful to detect case where the metadata we look at identical, but some other items we did not checked are missing. (spoiler: we will find some bug) Differential Revision: https://phab.mercurial-scm.org/D9195
Thu, 15 Oct 2020 10:28:27 -0700 copy: clarify in help text that `hg co --forget` takes a *destination* file
Martin von Zweigbergk <martinvonz@google.com> [Thu, 15 Oct 2020 10:28:27 -0700] rev 45731
copy: clarify in help text that `hg co --forget` takes a *destination* file We had a user who tried to pass a source file. The command then fails with `<file>: not unmarking as copy - file is not marked as copied`, so at least it's not just silent, but let's be a little clearer in the documentation. Differential Revision: https://phab.mercurial-scm.org/D9214
Thu, 15 Oct 2020 15:57:31 +0200 test: check server error output in `test-pull-bundle.t`
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 15 Oct 2020 15:57:31 +0200] rev 45730
test: check server error output in `test-pull-bundle.t` This is useful to debug test failure when they happens. Differential Revision: https://phab.mercurial-scm.org/D9213
Tue, 06 Oct 2020 01:51:56 +0200 unbundle: free temporary objects after use
Joerg Sonnenberger <joerg@bec.de> [Tue, 06 Oct 2020 01:51:56 +0200] rev 45729
unbundle: free temporary objects after use This reduces peak RSS for larger unbundle operations by ~30 Bytes per changeset on AMD64. This can't be a direct delete for Python 2.7, so reset the object instead and leave a comment. The efilesset object can't be deleted as it is referenced by the local onchangelog function and Python 2.7 rejects a delete on the existance of a nested scope. Differential Revision: https://phab.mercurial-scm.org/D9153
Tue, 13 Oct 2020 03:23:17 +0200 changing-files: add a shorthand property to check for copy relevant info
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 13 Oct 2020 03:23:17 +0200] rev 45728
changing-files: add a shorthand property to check for copy relevant info We are going to reuse this change in more place, so we factor it out first. Differential Revision: https://phab.mercurial-scm.org/D9197
Wed, 14 Oct 2020 17:51:56 +0200 pycompat: add an entry for unnamedtmpfile
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Oct 2020 17:51:56 +0200] rev 45727
pycompat: add an entry for unnamedtmpfile I am going to use unnamed temporary files to pass arbitrarily large input data to worker creating bundles. To do so, I need a unified API that work on py2 and py3. Differential Revision: https://phab.mercurial-scm.org/D9211
Wed, 14 Oct 2020 21:47:14 +0200 pycompat: update comment about unnamedtempfile
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 14 Oct 2020 21:47:14 +0200] rev 45726
pycompat: update comment about unnamedtempfile I found the comment clearer. I end up having to think about this for `TemporaryFile` and I update that one in the process. Differential Revision: https://phab.mercurial-scm.org/D9210
Tue, 08 Sep 2020 18:16:24 +0900 revset: add diff(pattern) predicate for "grep --diff"
Yuya Nishihara <yuya@tcha.org> [Tue, 08 Sep 2020 18:16:24 +0900] rev 45725
revset: add diff(pattern) predicate for "grep --diff" I find this is useful in GUI log viewer since the tool only needs to support "log -rREV" command. This is basic implementation. Windowed search is not implemented since it wouldn't work pretty well with the smartset API. And filename matcher is not supported because the syntax isn't determined. My idea is to add handling of diff(pattern, file(..)) and diff(pattern, follow(..)), which will then be evolved to a full revset+matcher combinator support: x & diff(pattern, y & z) ===== y & z builds (revs(y) & revs(z), matcher(y) & matcher(z)) pair, and narrows the search space of diff() ==================== diff() returns matched (revs, matcher) pair ======================== revs and matcher will be combined respectively by &-operator, and the matcher will optionally be used to filter "hg log -p" output The predicate name "diff()" wouldn't be great, but grep() is already used. Another options I can think of are "grepdiff()" and "containsdiff()". Naming suggestions are welcome.
Mon, 05 Oct 2020 20:40:39 +0900 stringutil: add function to compile stringmatcher pattern into regexp
Yuya Nishihara <yuya@tcha.org> [Mon, 05 Oct 2020 20:40:39 +0900] rev 45724
stringutil: add function to compile stringmatcher pattern into regexp Prepares for adding a revset predicate for "grep --diff". The grep logic needs a regexp object instead of a match function.
Wed, 14 Oct 2020 22:10:48 +0900 py3: fix stringmatcher() to byte-stringify exception message
Yuya Nishihara <yuya@tcha.org> [Wed, 14 Oct 2020 22:10:48 +0900] rev 45723
py3: fix stringmatcher() to byte-stringify exception message Spotted while writing regexp variant of stringmatcher().
Mon, 05 Oct 2020 20:53:34 +0900 stringutil: extract helper function that splits stringmatcher() pattern
Yuya Nishihara <yuya@tcha.org> [Mon, 05 Oct 2020 20:53:34 +0900] rev 45722
stringutil: extract helper function that splits stringmatcher() pattern
Wed, 09 Sep 2020 17:17:38 +0900 grep: extract main search loop as searcher method
Yuya Nishihara <yuya@tcha.org> [Wed, 09 Sep 2020 17:17:38 +0900] rev 45721
grep: extract main search loop as searcher method Still displayer part is in commands.grep(), the core grep logic is now reusable. I'll revisit the displayer stuff later since it will be another long series.
Sun, 04 Oct 2020 13:17:57 +0900 scmutil: move walkchangerevs() from cmdutil
Yuya Nishihara <yuya@tcha.org> [Sun, 04 Oct 2020 13:17:57 +0900] rev 45720
scmutil: move walkchangerevs() from cmdutil It's no longer a command-level function, but a pure helper to walk revisions in a windowed way. This change will help eliminate reverse dependency of revset.py -> grep.py -> cmdutil.py in future patches.
Wed, 09 Sep 2020 17:04:44 +0900 grep: extract public function to register file to be skipped
Yuya Nishihara <yuya@tcha.org> [Wed, 09 Sep 2020 17:04:44 +0900] rev 45719
grep: extract public function to register file to be skipped The main grep loop will be extracted to a searcher method, but this skipping condition depends on the result of display() function.
Tue, 13 Oct 2020 16:44:57 -0400 posix: avoid a leaked file descriptor in a unix domain socket exception case
Matt Harbison <matt_harbison@yahoo.com> [Tue, 13 Oct 2020 16:44:57 -0400] rev 45718
posix: avoid a leaked file descriptor in a unix domain socket exception case Differential Revision: https://phab.mercurial-scm.org/D9206
Tue, 13 Oct 2020 16:41:01 -0400 posix: use context managers in a couple of places
Matt Harbison <matt_harbison@yahoo.com> [Tue, 13 Oct 2020 16:41:01 -0400] rev 45717
posix: use context managers in a couple of places Differential Revision: https://phab.mercurial-scm.org/D9205
Wed, 14 Oct 2020 14:43:39 -0700 record: when backing up, avoid generating very long filenames
Kyle Lippincott <spectral@google.com> [Wed, 14 Oct 2020 14:43:39 -0700] rev 45716
record: when backing up, avoid generating very long filenames If the original file's path is longer than the individual filename maximum length (256 on Linux, I believe?), then this mechanism of "replace slashes with underscores" causes an error. Now, we'll produce just the "basename" of the file, plus some stuff to ensure it's unique. This can be potentially confusing for users if there's a file with the same name in multiple directories, but I suspect that this is better than just breaking. Example: `<reporoot>/a/long/path/to/somefile.txt` used to be backed up as `<reporoot>/.hg/record-backups/a_long_path_to_somefile.txt.abcdefgh`, it will now be backed up as `<reporoot>/.hg/record-backups/somefile.txt.abcdefgh` We could do the naive thing (what we were doing before) and have it to doing something with either subdirectories (`<backuproot>/a/long/path/to/somefile.txt.abcdefgh` or minimize #dirs with `<backuproot>/a_long_path/to_somefile.txt.abcdefgh`), prefix-truncated paths (such as `<backuproot>/__ath_to_somefile.txt.abcdefgh`, where that `__` elides enough to get us under 255 chars (counting the +9 we need to add!)), or hash-of-dirname (`<backuproot>/<sha1sum_of_dirname>/somefile.txt.abcdefgh`), but ultimately every option felt over engineered and that it would be more likely to cause problems than it would be to solve any, especially if it was conditional on directory length. Differential Revision: https://phab.mercurial-scm.org/D9207
Sat, 10 Oct 2020 12:43:04 +0530 mergestate: add `allextras()` to get all extras
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 10 Oct 2020 12:43:04 +0530] rev 45715
mergestate: add `allextras()` to get all extras `extras()` can only be used for getting extra for a file. However at couple of places in code, we wanted to iterate over all the extras stored with the mergestate and they were accessing the private `_stateextras`. We add a new function for this. Differential Revision: https://phab.mercurial-scm.org/D9190
Tue, 06 Oct 2020 19:11:34 +0530 mergestate: document `o` merge record state in _mergestate_base docs
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 06 Oct 2020 19:11:34 +0530] rev 45714
mergestate: document `o` merge record state in _mergestate_base docs _mergestate_base documentation serves as a nice documentation for mergestate. This also documents known merge records and known merge record states. I missed adding `o` state to it when I introduced it. Let's add it now. Differential Revision: https://phab.mercurial-scm.org/D9156
Fri, 09 Oct 2020 00:33:50 -0400 fix: update commit hash references in the new commits
Matt Harbison <matt_harbison@yahoo.com> [Fri, 09 Oct 2020 00:33:50 -0400] rev 45713
fix: update commit hash references in the new commits Differential Revision: https://phab.mercurial-scm.org/D9183
Fri, 09 Oct 2020 00:14:07 -0400 absorb: update commit hash references in the new commits
Matt Harbison <matt_harbison@yahoo.com> [Fri, 09 Oct 2020 00:14:07 -0400] rev 45712
absorb: update commit hash references in the new commits Differential Revision: https://phab.mercurial-scm.org/D9182
Thu, 08 Oct 2020 23:33:04 -0400 rewriteutil: handle dropped commits when updating description hashes
Matt Harbison <matt_harbison@yahoo.com> [Thu, 08 Oct 2020 23:33:04 -0400] rev 45711
rewriteutil: handle dropped commits when updating description hashes In looking to leverage this with the absorb extension, the old -> new mapping there allows the new value to be None. We could filter that out and not pass it to this method, but it seems worth a message to the user. (I wonder if these should be an info or warning, because it's unlikely people are using `-v` regularly.) Differential Revision: https://phab.mercurial-scm.org/D9181
Fri, 09 Oct 2020 10:20:53 +0200 dirstate-tree: move a conditional in an explicit boolean
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 09 Oct 2020 10:20:53 +0200] rev 45710
dirstate-tree: move a conditional in an explicit boolean This will help readability a bit and make the next change simpler to read. Differential Revision: https://phab.mercurial-scm.org/D9202
Thu, 08 Oct 2020 18:50:46 +0200 rust: cleanup some white space in a dock
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 08 Oct 2020 18:50:46 +0200] rev 45709
rust: cleanup some white space in a dock They seems to have sneaked there somehow. Differential Revision: https://phab.mercurial-scm.org/D9201
Sat, 10 Oct 2020 13:19:25 +0530 commit: pass ChangingFiles object as argument to _process_files
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 10 Oct 2020 13:19:25 +0530] rev 45708
commit: pass ChangingFiles object as argument to _process_files Instead of returning it, we pass it as an argument. This makes the whole if-else in `_prepare_files` a bit simpler. Else each if-else branch was creating the object. Differential Revision: https://phab.mercurial-scm.org/D9194
Sat, 10 Oct 2020 13:15:20 +0530 commit: pass mergestate into `_process_files` instead of re-reading it
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 10 Oct 2020 13:15:20 +0530] rev 45707
commit: pass mergestate into `_process_files` instead of re-reading it Differential Revision: https://phab.mercurial-scm.org/D9193
Sat, 10 Oct 2020 13:12:11 +0530 commit: move salvaged calculation a bit earlier in the function
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 10 Oct 2020 13:12:11 +0530] rev 45706
commit: move salvaged calculation a bit earlier in the function This helps us initialize mergestate before and now we can pass it into `_process_files()` instead of re-reading it there. Differential Revision: https://phab.mercurial-scm.org/D9192
Sat, 10 Oct 2020 12:53:35 +0530 commit: refactor salvage calculation to a different function
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 10 Oct 2020 12:53:35 +0530] rev 45705
commit: refactor salvage calculation to a different function Differential Revision: https://phab.mercurial-scm.org/D9191
Thu, 08 Oct 2020 09:54:38 -0700 tests: run test-copies-chain-merge.t also with copies in changesets
Martin von Zweigbergk <martinvonz@google.com> [Thu, 08 Oct 2020 09:54:38 -0700] rev 45704
tests: run test-copies-chain-merge.t also with copies in changesets We have these tests already and it seems like a waste to not run them in the changesets case. The biggest differences stem from `hg log --follow` not working with copies stored in the changeset extras. Differential Revision: https://phab.mercurial-scm.org/D9173
Thu, 08 Oct 2020 08:12:47 -0700 tests: add test of copies suggested by Pierre-Yves on D9159
Martin von Zweigbergk <martinvonz@google.com> [Thu, 08 Oct 2020 08:12:47 -0700] rev 45703
tests: add test of copies suggested by Pierre-Yves on D9159 Differential Revision: https://phab.mercurial-scm.org/D9171
Thu, 08 Oct 2020 15:09:28 -0700 tests: update test-copies-chain-merge.t to not use empty files
Martin von Zweigbergk <martinvonz@google.com> [Thu, 08 Oct 2020 15:09:28 -0700] rev 45702
tests: update test-copies-chain-merge.t to not use empty files Merging empty files is not very interesting or realistic. Differential Revision: https://phab.mercurial-scm.org/D9172
Fri, 09 Oct 2020 19:19:10 +0900 revset: fix sorting key of wdir revision
Yuya Nishihara <yuya@tcha.org> [Fri, 09 Oct 2020 19:19:10 +0900] rev 45701
revset: fix sorting key of wdir revision It would go wrong on Python 2, and would crash on Python 3.
Wed, 09 Sep 2020 16:18:26 +0900 grep: move prep() to grepsearcher class
Yuya Nishihara <yuya@tcha.org> [Wed, 09 Sep 2020 16:18:26 +0900] rev 45700
grep: move prep() to grepsearcher class
Wed, 09 Sep 2020 16:04:39 +0900 grep: move readfile() to grepsearcher class
Yuya Nishihara <yuya@tcha.org> [Wed, 09 Sep 2020 16:04:39 +0900] rev 45699
grep: move readfile() to grepsearcher class
Wed, 09 Sep 2020 16:00:03 +0900 grep: move getbody() to grepsearcher class
Yuya Nishihara <yuya@tcha.org> [Wed, 09 Sep 2020 16:00:03 +0900] rev 45698
grep: move getbody() to grepsearcher class
Wed, 09 Sep 2020 15:56:40 +0900 grep: add stub class that maintains cache and states of grep operation
Yuya Nishihara <yuya@tcha.org> [Wed, 09 Sep 2020 15:56:40 +0900] rev 45697
grep: add stub class that maintains cache and states of grep operation Prepares for extracting stateful functions from commands.grep().
Wed, 09 Sep 2020 15:23:49 +0900 grep: move match and diff logic to new module
Yuya Nishihara <yuya@tcha.org> [Wed, 09 Sep 2020 15:23:49 +0900] rev 45696
grep: move match and diff logic to new module commands.grep() has lots of functions and classes. Let's split it into reusable components so we can leverage them to implement a revset predicate for 'hg grep --diff'. I want to do 'hg log -r "diff(pattern)"'.
Wed, 09 Sep 2020 15:17:26 +0900 grep: explicitly pass regexp to closure functions
Yuya Nishihara <yuya@tcha.org> [Wed, 09 Sep 2020 15:17:26 +0900] rev 45695
grep: explicitly pass regexp to closure functions These functions will be extracted to new module.
Thu, 08 Oct 2020 17:29:51 +0530 upgrade: improve documentation of matchrevlog()
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 08 Oct 2020 17:29:51 +0530] rev 45694
upgrade: improve documentation of matchrevlog() It was not clear what selected for cloning meant. I updated with an extra line of description.
Fri, 09 Oct 2020 09:46:03 -0700 automation: support running against Python 3.9
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 09 Oct 2020 09:46:03 -0700] rev 45693
automation: support running against Python 3.9 We just added CPython 3.9.0 to the automation environment. Let's support actions targeting it. One side-effect of this change is that we'll produce Windows wheels for Python 3.9 by default. This is desirable. Differential Revision: https://phab.mercurial-scm.org/D9189
Fri, 09 Oct 2020 09:22:59 -0700 automation: upgrade packages in Linux environment
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 09 Oct 2020 09:22:59 -0700] rev 45692
automation: upgrade packages in Linux environment It's been a while since we've ran `pip-compile -U`. Let's do that. When I ran this command, black was upgraded and newer versions of black complains about formatting differences. I didn't feel like shaving a yak, so I pinned the current black version to avoid churn. I manually ran tests against all major Python versions and I'm fairly certain no new test failures were introduced. Differential Revision: https://phab.mercurial-scm.org/D9188
Thu, 08 Oct 2020 18:17:20 -0700 packaging: upgrade packages in Windows environment
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 08 Oct 2020 18:17:20 -0700] rev 45691
packaging: upgrade packages in Windows environment I ran `pip-compile -U` to update all packages to latest versions. I did this so the Windows environment is more modern. dulwich 0.20 dropped support for Python 2.7. Rather than add yet another requirements.txt file, I decided to just pin at an older release to minimize complexity. Differential Revision: https://phab.mercurial-scm.org/D9187
Thu, 08 Oct 2020 18:07:34 -0700 contrib: install Python 3.9.0
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 08 Oct 2020 18:07:34 -0700] rev 45690
contrib: install Python 3.9.0 We update the Windows and Linux environments to install CPython 3.9.0, which was released a few days ago. Differential Revision: https://phab.mercurial-scm.org/D9186
Thu, 08 Oct 2020 18:02:47 -0700 contrib: stop installing Python 3.5 and 3.6 in Windows environment
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 08 Oct 2020 18:02:47 -0700] rev 45689
contrib: stop installing Python 3.5 and 3.6 in Windows environment We're only publishing Python 3.7+ wheels and other builds on Windows. Python 3.5 and 3.6 are not supported on this platform. Let's stop installing them in the development environment. Differential Revision: https://phab.mercurial-scm.org/D9185
Fri, 09 Oct 2020 09:17:47 -0700 py3: convert an exception message to bytes
Martin von Zweigbergk <martinvonz@google.com> [Fri, 09 Oct 2020 09:17:47 -0700] rev 45688
py3: convert an exception message to bytes One of our users ran into this (unrelated to my recent work on more specific errors). Differential Revision: https://phab.mercurial-scm.org/D9184
Fri, 09 Oct 2020 08:08:54 -0700 tests: fix test-url.py on py3, broken by D9179
Martin von Zweigbergk <martinvonz@google.com> [Fri, 09 Oct 2020 08:08:54 -0700] rev 45687
tests: fix test-url.py on py3, broken by D9179 Differential Revision: https://phab.mercurial-scm.org/D9180
Thu, 08 Oct 2020 16:14:06 +0200 revset: add a `node` key for sorting
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 08 Oct 2020 16:14:06 +0200] rev 45686
revset: add a `node` key for sorting Sorting by node give an arbitrary, but stable order which is useful for sampling.
Sun, 04 Oct 2020 22:32:41 -0700 pyoxidizer: produce working Python 3 Windows installers (issue6366)
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 04 Oct 2020 22:32:41 -0700] rev 45685
pyoxidizer: produce working Python 3 Windows installers (issue6366) While we've had code to produce Python 3 Windows installers with PyOxidizer, we haven't been advertising them on the web site due to a bug in making TLS connections and issues around resource handling. This commit upgrades our PyOxidizer install and configuration to use a recent Git commit of PyOxidizer. This new version of PyOxidizer contains a *ton* of changes, improvements, and bug fixes. Notably, Windows shared distributions now mostly "just work" and the TLS bug and random problems with Python extension modules in the standard library go away. And Python has been upgraded from 3.7 to 3.8.6. The price we pay for this upgrade is a ton of backwards incompatible changes to Starlark. I applied this commit (the overall series actually) on stable to produce Windows installers for Mercurial 5.5.2, which I published shortly before submitting this commit for review. In order to get the stable branch working, I decided to take a less aggressive approach to Python resource management. Previously, we were attempting to load all Python modules from memory and were performing some hacks to copy Mercurial's non-module resources into additional directories in Starlark. This commit implements a resource callback function in Starlark (a new feature since PyOxidizer 0.7) to dynamically assign standard library resources to in-memory loading and all other resources to filesystem loading. This means that Mercurial's files and all the other packages we ship in the Windows installers (e.g. certifi and pygments) are loaded from the filesystem instead of from memory. This avoids issues due to lack of __file__ and enables us to ship a working Python 3 installer on Windows. The end state of the install layout after this patch is not ideal for @: we still copy resource files like templates and help text to directories next to the hg.exe executable. There is code in @ to use importlib.resources to load these files and we could likely remove these copies once this lands on @. But for now, the install layout mimics what we've shipped for seemingly forever and is backwards compatible. It allows us to achieve the milestone of working Python 3 Windows installers and gets us a giant step closer to deleting Python 2. Differential Revision: https://phab.mercurial-scm.org/D9148
Thu, 08 Oct 2020 13:19:18 -0700 tests: set git config using `git config` for simplicity
Martin von Zweigbergk <martinvonz@google.com> [Thu, 08 Oct 2020 13:19:18 -0700] rev 45684
tests: set git config using `git config` for simplicity I also took the liberty to not set the same config value twice as we did before. Differential Revision: https://phab.mercurial-scm.org/D9176
Thu, 08 Oct 2020 13:10:16 -0700 tests: use `git init` instead of unusual synonym `git init-db`
Martin von Zweigbergk <martinvonz@google.com> [Thu, 08 Oct 2020 13:10:16 -0700] rev 45683
tests: use `git init` instead of unusual synonym `git init-db` I had never heard of `git init-db` until I saw our tests. Differential Revision: https://phab.mercurial-scm.org/D9175
Thu, 08 Oct 2020 13:37:31 -0700 errors: name arguments to Abort constructor
Martin von Zweigbergk <martinvonz@google.com> [Thu, 08 Oct 2020 13:37:31 -0700] rev 45682
errors: name arguments to Abort constructor Differential Revision: https://phab.mercurial-scm.org/D9179
Thu, 08 Oct 2020 15:35:44 -0700 errors: stop passing non-strings to Abort's constructor
Martin von Zweigbergk <martinvonz@google.com> [Thu, 08 Oct 2020 15:35:44 -0700] rev 45681
errors: stop passing non-strings to Abort's constructor The next patch will change `Abort`'s constructor and `__bytes__` functions and they will start assuming that the first argument is the messages as `bytes`. Differential Revision: https://phab.mercurial-scm.org/D9178
Tue, 06 Oct 2020 21:06:18 -0700 errors: name arguments to UnknownCommand constructor
Martin von Zweigbergk <martinvonz@google.com> [Tue, 06 Oct 2020 21:06:18 -0700] rev 45680
errors: name arguments to UnknownCommand constructor Differential Revision: https://phab.mercurial-scm.org/D9166
Tue, 06 Oct 2020 20:45:52 -0700 errors: name arguments to AmbiguousCommand constructor
Martin von Zweigbergk <martinvonz@google.com> [Tue, 06 Oct 2020 20:45:52 -0700] rev 45679
errors: name arguments to AmbiguousCommand constructor Differential Revision: https://phab.mercurial-scm.org/D9165
Tue, 06 Oct 2020 20:37:35 -0700 errors: name arguments to CommandError constructor
Martin von Zweigbergk <martinvonz@google.com> [Tue, 06 Oct 2020 20:37:35 -0700] rev 45678
errors: name arguments to CommandError constructor Because readability counts. Differential Revision: https://phab.mercurial-scm.org/D9164
Tue, 06 Oct 2020 21:52:27 -0700 errors: move UnknownCommand and AmbiguousCommand near CommandError
Martin von Zweigbergk <martinvonz@google.com> [Tue, 06 Oct 2020 21:52:27 -0700] rev 45677
errors: move UnknownCommand and AmbiguousCommand near CommandError They seem closely related. Differential Revision: https://phab.mercurial-scm.org/D9163
Wed, 07 Oct 2020 00:45:41 +0800 templatekw: make {successorssets} always return a list (issue6342)
Aay Jay Chan <aayjaychan@itopia.com.hk> [Wed, 07 Oct 2020 00:45:41 +0800] rev 45676
templatekw: make {successorssets} always return a list (issue6342) Previously, {successorssets} returns an empty string instead of an empty list for a non-obsolete changeset. The changing type of the JSON output makes it hard to consume from statically-typed languages. Differential Revision: https://phab.mercurial-scm.org/D9158
Wed, 07 Oct 2020 00:39:52 +0800 tests: test output of {predecessors}, {successorssets} for non-obsolete csets
Aay Jay Chan <aayjaychan@itopia.com.hk> [Wed, 07 Oct 2020 00:39:52 +0800] rev 45675
tests: test output of {predecessors}, {successorssets} for non-obsolete csets Differential Revision: https://phab.mercurial-scm.org/D9157
Thu, 08 Oct 2020 23:19:01 -0700 branching: merge with stable
Martin von Zweigbergk <martinvonz@google.com> [Thu, 08 Oct 2020 23:19:01 -0700] rev 45674
branching: merge with stable
Thu, 01 Oct 2020 09:45:00 +0200 copies: move `merged` testing sooner
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 01 Oct 2020 09:45:00 +0200] rev 45673
copies: move `merged` testing sooner previously `is_merged` was an expensive callback. Now that all this data is pre-computed, this is is a simple membership testing. So it is probably cheaper than the membership testing. Differential Revision: https://phab.mercurial-scm.org/D9141
Thu, 01 Oct 2020 09:42:39 +0200 copies: return None instead of ChangingFiles when relevant
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 01 Oct 2020 09:42:39 +0200] rev 45672
copies: return None instead of ChangingFiles when relevant If they are not relevant data, they are no need to fetch them. Differential Revision: https://phab.mercurial-scm.org/D9140
Thu, 01 Oct 2020 09:29:49 +0200 copies: add a HASCOPIESINFO flag to highlight rev with useful data
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 01 Oct 2020 09:29:49 +0200] rev 45671
copies: add a HASCOPIESINFO flag to highlight rev with useful data If some files changes that may impact copy tracing are detected, we set this flag. This helps the copy tracing algorithm to skip fetching possibly expensive data when unnecessary. Differential Revision: https://phab.mercurial-scm.org/D9139
Wed, 16 Sep 2020 21:00:02 +0200 salvaged: properly deal with salvaged file during copy tracing
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 16 Sep 2020 21:00:02 +0200] rev 45670
salvaged: properly deal with salvaged file during copy tracing When salvaged files are encountered, the removal have been reverted and we should keep the rename information from the other side. The conditional was starting to be quite hairy, so we spell it out in multiple elif case for readability. This fixes the associated test cases introduced a while back. The changeset centric copy tracing is now (known) bug free. Differential Revision: https://phab.mercurial-scm.org/D9130
Tue, 15 Sep 2020 10:55:17 +0200 salvaged: persist the salvaged set on disk
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 15 Sep 2020 10:55:17 +0200] rev 45669
salvaged: persist the salvaged set on disk With the new side data storage, this is trivial. Differential Revision: https://phab.mercurial-scm.org/D9129
Tue, 29 Sep 2020 22:47:54 +0200 changing-files: add clean computation of changed file for merges
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 29 Sep 2020 22:47:54 +0200] rev 45668
changing-files: add clean computation of changed file for merges This is "a tad more complicated" than the previous cases. See inline documentation for details (have fun). Differential Revision: https://phab.mercurial-scm.org/D9128
Tue, 29 Sep 2020 22:46:29 +0200 changing-files: add clean computation of changed files for linear changesets
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 29 Sep 2020 22:46:29 +0200] rev 45667
changing-files: add clean computation of changed files for linear changesets The `files` field is not reliable, so we need to compute things from scratch. We deal with the second simplest case, linear changesets. We diff the current manifest with the parent manifest. This reveal the file added, changed and removed. Differential Revision: https://phab.mercurial-scm.org/D9127
(0) -30000 -10000 -3000 -1000 -120 +120 +1000 +3000 tip