Tue, 12 Jan 2021 00:11:16 +0300 convert: option to set date and time for svn commits
Nikita Slyusarev <nslus@yandex-team.com> [Tue, 12 Jan 2021 00:11:16 +0300] rev 46472
convert: option to set date and time for svn commits Converting to subversion repository is not preserving original commit dates as it may break some subversion functionality if commit dates are not monotonically increasing. This patch adds `convert.svn.dangerous-set-commit-dates` configuration option to change this behaviour and enable commit dates convertion for those who want to take risks. Subversion always uses commit dates with UTC timezone, so only timestamps are used. Test `test-convert-svn-sink.t` uses `svnxml.py` script to dump history of svn repositories. Atm the script is not printing `date` field from svn log. This patch changes this to allow checks on correctness of date and time convertion. Documentation is updated. Additional test case is added to test commit dates convertion. Differential Revision: https://phab.mercurial-scm.org/D9721
Fri, 15 Jan 2021 23:58:41 +0100 copies: simplify the conditional for _filter's case 3
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 15 Jan 2021 23:58:41 +0100] rev 46471
copies: simplify the conditional for _filter's case 3 The conditional is much simpler and the test are actually happier. This clarification of the conditional will also be necessary to properly support tracing more renames in a coming changeset. Differential Revision: https://phab.mercurial-scm.org/D9795
Fri, 15 Jan 2021 23:49:51 +0100 copies: clarify which case some conditional are handling
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 15 Jan 2021 23:49:51 +0100] rev 46470
copies: clarify which case some conditional are handling This make the function a bit clearer. The middle conditional get no label because we about about to remove it. See next changeset for details. Differential Revision: https://phab.mercurial-scm.org/D9794
Sat, 16 Jan 2021 02:18:55 +0100 copies: explicitly filter out existing file in graftcopies
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 16 Jan 2021 02:18:55 +0100] rev 46469
copies: explicitly filter out existing file in graftcopies The `graftcopies` function does something very strange (maybe even wrong), it calls `_filter` with a pair of changeset that does not match the one used to compute the copies informations. We are about to do some rework of `_filter` to make it closer to its documented intent and fix a couple of bug. This means some of the logic that only make sense for graft need to go somewhere else. We add the extra filtering with proper documentation to `graftcopies`. Differential Revision: https://phab.mercurial-scm.org/D9802
Fri, 22 Jan 2021 15:43:06 -0500 histedit: rip out mysterious catch-all ignore curses.error handler
Augie Fackler <augie@google.com> [Fri, 22 Jan 2021 15:43:06 -0500] rev 46468
histedit: rip out mysterious catch-all ignore curses.error handler I have no idea why this was here, and ripping it out doesn't obviously break anything for me (tests all pass, I can poke around chistedit UI a bit without issue), so I'm thinking we should rip it out and see if we get bug reports. Differential Revision: https://phab.mercurial-scm.org/D9855
Fri, 22 Jan 2021 15:32:00 -0500 histedit: notice when the main window underflows height and abort
Augie Fackler <augie@google.com> [Fri, 22 Jan 2021 15:32:00 -0500] rev 46467
histedit: notice when the main window underflows height and abort If you try to have a 13-line-tall terminal and use curses histedit, it fails by spinning in an infinite loop due to the catch-all ignore of curses errors on line 1682 of histedit.py. We should also fix that catch-all ignore of curses errors (what other demons lurk here, I wonder?) but we can trivially catch this case and guide the user to a happy path. We've seen this mostly in IDE users that have a tendency to have really tiny embedded terminal windows. Differential Revision: https://phab.mercurial-scm.org/D9854
Fri, 22 Jan 2021 15:29:12 -0500 histedit: don't assign to _ for unused values
Augie Fackler <augie@google.com> [Fri, 22 Jan 2021 15:29:12 -0500] rev 46466
histedit: don't assign to _ for unused values I don't know what this ignored value is, but we need to not clobber the _() function from gettext, or we get mysterious crashes instead of internationalizing some strings in my upcoming patches. Differential Revision: https://phab.mercurial-scm.org/D9853
Tue, 26 Jan 2021 17:25:30 -0500 hghave: list the module needed for the `vcr` check
Matt Harbison <matt_harbison@yahoo.com> [Tue, 26 Jan 2021 17:25:30 -0500] rev 46465
hghave: list the module needed for the `vcr` check I'm tired of having to look up modules each time I setup a system, and try to distinguish between similar package names to get the right one. Now that the search API has been disabled, it's even harder. There are other python packages here that should be listed like this, but this is the one that came up missing today, so it's a start. Differential Revision: https://phab.mercurial-scm.org/D9879
Tue, 26 Jan 2021 00:19:36 +0100 debugshell: add a simple command for starting an interactive shell
Joerg Sonnenberger <joerg@bec.de> [Tue, 26 Jan 2021 00:19:36 +0100] rev 46464
debugshell: add a simple command for starting an interactive shell This simplifies interactive exploration of the Mercurial APIs. The ui and repo instances are provided as local variables. Differential Revision: https://phab.mercurial-scm.org/D9866
Mon, 25 Jan 2021 11:34:23 +0100 rust: replace an unsafe use of transmute with a safe use of bytes-cast
Simon Sapin <simon.sapin@octobus.net> [Mon, 25 Jan 2021 11:34:23 +0100] rev 46463
rust: replace an unsafe use of transmute with a safe use of bytes-cast Differential Revision: https://phab.mercurial-scm.org/D9859
Fri, 15 Jan 2021 16:11:54 +0100 rust: use the bytes-cast crate to parse persistent nodemaps
Simon Sapin <simon.sapin@octobus.net> [Fri, 15 Jan 2021 16:11:54 +0100] rev 46462
rust: use the bytes-cast crate to parse persistent nodemaps This crate casts pointers to custom structs, with compile-time safety checks, for easy and efficient binary data parsing. See https://crates.io/crates/bytes-cast and https://docs.rs/bytes-cast/0.1.0/bytes_cast/ Differential Revision: https://phab.mercurial-scm.org/D9788
Mon, 25 Jan 2021 19:03:27 -0500 cext: restore the ability to build on Windows with py2
Matt Harbison <matt_harbison@yahoo.com> [Mon, 25 Jan 2021 19:03:27 -0500] rev 46461
cext: restore the ability to build on Windows with py2 This broke in e92ca942ddca. Differential Revision: https://phab.mercurial-scm.org/D9867
Mon, 25 Jan 2021 16:46:51 +0100 command-namespace: use `::` are the command separator
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 25 Jan 2021 16:46:51 +0100] rev 46460
command-namespace: use `::` are the command separator This was discussed on the mailing list / phab and `::` got a couple of positive feedback. I dediced to not introduce automatic folding of `::`, I feel like it make sense for `-`, but I like the expliciteness of `::`. So I am adding alias for backward compatibility. Differential Revision: https://phab.mercurial-scm.org/D9872
Mon, 25 Jan 2021 23:13:01 +0100 perf: test the formatting of a command help
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 25 Jan 2021 23:13:01 +0100] rev 46459
perf: test the formatting of a command help Since we are about to addd ':' in command name I want this covered. Differential Revision: https://phab.mercurial-scm.org/D9871
Mon, 25 Jan 2021 23:08:33 +0100 help: escape ':' (as '\:') when generating command names
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 25 Jan 2021 23:08:33 +0100] rev 46458
help: escape ':' (as '\:') when generating command names We need this before we can use ":" in command names. Differential Revision: https://phab.mercurial-scm.org/D9870
Mon, 25 Jan 2021 23:07:56 +0100 minirst: respect escaping in definition list key
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 25 Jan 2021 23:07:56 +0100] rev 46457
minirst: respect escaping in definition list key If we start adding `:` in command names… we need minirst to not choke on them. Differential Revision: https://phab.mercurial-scm.org/D9869
Tue, 26 Jan 2021 00:45:40 +0100 run-test: avoid byte issue when replacing output file of python test
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 26 Jan 2021 00:45:40 +0100] rev 46456
run-test: avoid byte issue when replacing output file of python test Otherwise we get error like:: FileNotFoundError: [Errno 2] No such file or directory: "b'…/tests/test-minirst.py'.out" Differential Revision: https://phab.mercurial-scm.org/D9868
Mon, 25 Jan 2021 16:34:43 +0100 store: use `endswith` to detect revlog extension
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 25 Jan 2021 16:34:43 +0100] rev 46455
store: use `endswith` to detect revlog extension Suggested by Gregory Szorc. Differential Revision: https://phab.mercurial-scm.org/D9865
Tue, 01 Dec 2020 12:59:33 -0500 black: merge config into main pyproject.toml now that we have it
Augie Fackler <augie@google.com> [Tue, 01 Dec 2020 12:59:33 -0500] rev 46454
black: merge config into main pyproject.toml now that we have it This means that naive contributors who just run `black` on a source file will get reasonable behavior as long as they have a recent black. Yay! Differential Revision: https://phab.mercurial-scm.org/D9834
Tue, 01 Dec 2020 12:52:04 -0500 pyproject: add config file
Augie Fackler <augie@google.com> [Tue, 01 Dec 2020 12:52:04 -0500] rev 46453
pyproject: add config file This will tell pip et al to call our setup.py for the majority of packaging concerns, but also gives us a place to put standard config stuff like black. Differential Revision: https://phab.mercurial-scm.org/D9833
Thu, 14 Jan 2021 16:37:10 +0530 upgrade: update only requirements if we can
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 14 Jan 2021 16:37:10 +0530] rev 46452
upgrade: update only requirements if we can Upgrade operations which involves just upgrading requirements earlier used to go through whole revlog cloning business. Now we just upgrade the requirement and skip the cloning part. Differential Revision: https://phab.mercurial-scm.org/D9775
Thu, 14 Jan 2021 16:34:58 +0530 engine: add `if True` to prepare for next patch
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 14 Jan 2021 16:34:58 +0530] rev 46451
engine: add `if True` to prepare for next patch This will help making next patch easier to read. Differential Revision: https://phab.mercurial-scm.org/D9774
Thu, 14 Jan 2021 17:27:54 +0530 test: unquiet few tests to demonstrate changes in upcoming patches
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 14 Jan 2021 17:27:54 +0530] rev 46450
test: unquiet few tests to demonstrate changes in upcoming patches Upcoming patches will skip revlog cloning for share-safe upgrades. Differential Revision: https://phab.mercurial-scm.org/D9773
Thu, 14 Jan 2021 16:57:11 +0530 upgrade: mark sharesafe improvement as only touching requirements
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 14 Jan 2021 16:57:11 +0530] rev 46449
upgrade: mark sharesafe improvement as only touching requirements Upgrading the repository to use share safe functionality only touches requirements. Differential Revision: https://phab.mercurial-scm.org/D9772
Mon, 14 Dec 2020 16:20:00 +0530 actions: calculate what all parts does the operation touches
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 14 Dec 2020 16:20:00 +0530] rev 46448
actions: calculate what all parts does the operation touches To make upgrade work less in certain situations, we need to teach it to find out what all parts of repository current operation is touching. This patch starts doing that. In next patch we will be setting values in improvement objects. For now, we assume everything touches everything. Differential Revision: https://phab.mercurial-scm.org/D9771
Thu, 14 Jan 2021 16:25:40 +0530 upgrade: don't create store backup if `--no-backup` is passed
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 14 Jan 2021 16:25:40 +0530] rev 46447
upgrade: don't create store backup if `--no-backup` is passed If the user explicitly mentioned that they don't need backup, then let's not create it. Differential Revision: https://phab.mercurial-scm.org/D9770
Mon, 14 Dec 2020 10:44:29 +0100 cext: add Python 3.10 support
Victor Stinner <vstinner@python.org> [Mon, 14 Dec 2020 10:44:29 +0100] rev 46446
cext: add Python 3.10 support * Replace "Py_TYPE(obj) = type;" with "Py_SET_TYPE(obj, type);" * Add pythoncapi_compat.h header file to get Py_SET_TYPE() on Python 2.7-3.8. Header file added to mercurial/ and contrib/python-zstandard/zstd/common/. In Python 3.10, Py_TYPE(obj) must not longer be used as an l-value. pythoncapi_compat.h comes from: https://github.com/pythoncapi/pythoncapi_compat Differential Revision: https://phab.mercurial-scm.org/D9825
Wed, 20 Jan 2021 14:47:13 +0100 revlog: decouple caching from addrevision callback for addgroup
Joerg Sonnenberger <joerg@bec.de> [Wed, 20 Jan 2021 14:47:13 +0100] rev 46445
revlog: decouple caching from addrevision callback for addgroup For changesets, it is useful to cache the content as it will almost always be processed afterwards. For manifests on the other hand, the content is often not used directly as there is a fast path for deltas. Explicitly disable the cache in exchangev2's manifest handling for that reason. Differential Revision: https://phab.mercurial-scm.org/D9847
Fri, 15 Jan 2021 01:58:59 +0100 branchmap: update rev-branch-cache incrementally
Joerg Sonnenberger <joerg@bec.de> [Fri, 15 Jan 2021 01:58:59 +0100] rev 46444
branchmap: update rev-branch-cache incrementally Historically, the revision to branch mapping cache was updated on demand and shared via bundle2 to avoid the cost of rebuilding on first use. Use the new `register_changeset` callback and update rbc directly on every change. Make the transfer of the bundle part redundant, but keep it for the moment to avoid the test churn. Over all, "hg unbundle" for large bundles is less than 1.8% slower for different larger repositories and that seems to a reasonable trade off. Differential Revision: https://phab.mercurial-scm.org/D9781
Tue, 19 Jan 2021 00:20:53 +0100 repository: introduce register_changeset callback
Joerg Sonnenberger <joerg@bec.de> [Tue, 19 Jan 2021 00:20:53 +0100] rev 46443
repository: introduce register_changeset callback The new callback is called whenever a changeset is added to the repository (commit, unbundle or exchange). Since the bulk operations already parse the changeset (readfiles or full changesetrevision), always use the latter to avoid redundant lookups. The first consumer of the new interface needs to look at extra. Differential Revision: https://phab.mercurial-scm.org/D9780
Fri, 15 Jan 2021 01:30:08 +0100 changelog: move branchinfo to changelogrevision
Joerg Sonnenberger <joerg@bec.de> [Fri, 15 Jan 2021 01:30:08 +0100] rev 46442
changelog: move branchinfo to changelogrevision The function parses the extra dictionary after looking up the changelogrevision. To avoid duplicated look up, it is better to provide it as property of changelogrevision instead. Keep the function for a release cycle as at least the topic extension depends on it. Differential Revision: https://phab.mercurial-scm.org/D9779
Fri, 22 Jan 2021 11:10:39 +0100 rust: lower compile error on non-linux platforms to a warning
Dan Villiom Podlaski Christiansen <danchr@gmail.com> [Fri, 22 Jan 2021 11:10:39 +0100] rev 46441
rust: lower compile error on non-linux platforms to a warning As discussed on D9671#146704 this lowers the error to a warning. Differential Revision: https://phab.mercurial-scm.org/D9852
Mon, 18 Jan 2021 10:24:20 +0100 purge: move extension into core mercurial
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com> [Mon, 18 Jan 2021 10:24:20 +0100] rev 46440
purge: move extension into core mercurial The motivation is simple: it's nicer to avoid gating basic functionality. To reduce the risk of people shooting themselves in the feet, `--confirm` is now the default, unless the extensions is loaded.. For review of the body of the purge command, use this instead of what hg/phabricator will show (the block of code is modified, not just moved): Differential Revision: https://phab.mercurial-scm.org/D9820
Mon, 18 Jan 2021 10:24:11 +0100 purge: also deal with directory with --confirm
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 18 Jan 2021 10:24:11 +0100] rev 46439
purge: also deal with directory with --confirm Getting the exact number is simple (you have to project the result of previous deletion to detect super-directory with only about-to-be-deleted content). So we use a vaguer message. Differential Revision: https://phab.mercurial-scm.org/D9819
Mon, 18 Jan 2021 10:24:03 +0100 purge: add a --confirm option
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 18 Jan 2021 10:24:03 +0100] rev 46438
purge: add a --confirm option The options provide a prompt to the user before permanent deletion are made. The prompt is currently not aware of directory deletion. I'll fix this in the next changesets. Differential Revision: https://phab.mercurial-scm.org/D9818
Mon, 11 May 2020 18:45:45 -0400 filemerge: add a hacktastic version of internal:merge3 for merge diffs
Augie Fackler <augie@google.com> [Mon, 11 May 2020 18:45:45 -0400] rev 46437
filemerge: add a hacktastic version of internal:merge3 for merge diffs This is a version of merge3 that always reports success, so that conflict markers get preserved without us having to implement conflict storage for in-memory merge. Credit to martinvonz for the idea. The only planned consumer of this "merge tool" is my upcoming merge-diffs functionality, though I suspect it could be useful in other ways. Differential Revision: https://phab.mercurial-scm.org/D8515
Thu, 28 May 2020 17:31:41 -0400 rebase: add a config knob for forcing in-memory rebasing
Augie Fackler <augie@google.com> [Thu, 28 May 2020 17:31:41 -0400] rev 46436
rebase: add a config knob for forcing in-memory rebasing Use it in a test case where we know the rebase should proceed without incident in-memory, so we can see tracebacks rather than fallbacks. This makes it easier to try and debug when things are broken. Differential Revision: https://phab.mercurial-scm.org/D8623
Mon, 18 May 2020 17:29:53 -0400 cleanup: use mergestate.unresolvedcount() instead of bool(list(unresolved()))
Augie Fackler <augie@google.com> [Mon, 18 May 2020 17:29:53 -0400] rev 46435
cleanup: use mergestate.unresolvedcount() instead of bool(list(unresolved())) This avoids some pointless copying. Differential Revision: https://phab.mercurial-scm.org/D8566
Fri, 15 Jan 2021 01:20:47 +0100 reverse-branch-cache: switch to doubling allocating scheme
Joerg Sonnenberger <joerg@bec.de> [Fri, 15 Jan 2021 01:20:47 +0100] rev 46434
reverse-branch-cache: switch to doubling allocating scheme In preperation for updating the reverse-branch-cache incrementally whenever a new changeset comes in, avoid bad performance on resize with Python 3.7 (and likely other 3.x versions). Differential Revision: https://phab.mercurial-scm.org/D9778
Sun, 17 Jan 2021 23:21:33 +0100 discovery: add config options to control sample size
Pierre-Yves David <pierre-yves.david@octobus.net> [Sun, 17 Jan 2021 23:21:33 +0100] rev 46433
discovery: add config options to control sample size This get useful for running analysis of the current algorithm. Differential Revision: https://phab.mercurial-scm.org/D9813
Tue, 19 Jan 2021 00:20:42 +0100 exchangev2: avoid second look-up by node
Joerg Sonnenberger <joerg@bec.de> [Tue, 19 Jan 2021 00:20:42 +0100] rev 46432
exchangev2: avoid second look-up by node Accessing the revlog by node is slightly more expensive than by revision, so look up the revision first and use it afterwards. Differential Revision: https://phab.mercurial-scm.org/D9831
Tue, 19 Jan 2021 00:18:39 +0100 commit: look-up new revision once
Joerg Sonnenberger <joerg@bec.de> [Tue, 19 Jan 2021 00:18:39 +0100] rev 46431
commit: look-up new revision once Look-up by node is slightly more expensive, so since it is necessary more than once, do it explicitly. Differential Revision: https://phab.mercurial-scm.org/D9830
Tue, 19 Jan 2021 14:00:42 -0800 resolve: also detect new :mergediff conflict markers
Martin von Zweigbergk <martinvonz@google.com> [Tue, 19 Jan 2021 14:00:42 -0800] rev 46430
resolve: also detect new :mergediff conflict markers The conflict markers created by `:mergediff` were not detected as conflicts, which affects both `commands.resolve.mark-check` and `mergetools.<tool>.check`. This patch fixes that. The new regex it uses for finding conflict markers is less restrictive because it `:mergediff` doesn't follow the `<<<<<<<` and `>>>>>>>` lines by a space (and a description). Hopefully lines like that don't give too many false positives. We can add back the space and make `:mergediff` add trailing spaces if it turns out to be a problem. OTOH, there will always be some false positives and we have ways of overriding the checks already. This patch can go onto the default or stable branch, depending on how much we care about an experimental feature. Differential Revision: https://phab.mercurial-scm.org/D9835
Mon, 18 Jan 2021 22:32:09 -0800 simplemerge: delete unused find_unconflicted()
Martin von Zweigbergk <martinvonz@google.com> [Mon, 18 Jan 2021 22:32:09 -0800] rev 46429
simplemerge: delete unused find_unconflicted() The function has been unused ever since it was introduced in 465b9ea02868 (Import 3-way merge code from bzr, 2007-04-16). Differential Revision: https://phab.mercurial-scm.org/D9832
Fri, 04 Dec 2020 10:11:01 +0100 perf: use the `perf--` prefix for perf command
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 04 Dec 2020 10:11:01 +0100] rev 46428
perf: use the `perf--` prefix for perf command This is the one command namespace where they should not be any ambiguity about command that should be in it. The perf extensions is only adding performance related command. so this is a good ground to start putting dash folding to the tests. Differential Revision: https://phab.mercurial-scm.org/D9516
Tue, 19 Jan 2021 12:22:05 -0500 merge with stable
Augie Fackler <augie@google.com> [Tue, 19 Jan 2021 12:22:05 -0500] rev 46427
merge with stable
Mon, 18 Jan 2021 19:16:49 +0530 share: move share safe functionality out of experimental
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 18 Jan 2021 19:16:49 +0530] rev 46426
share: move share safe functionality out of experimental The share-safe functionality is complete and all configuration options are implemented. The behavior is well discussed on mailing list and in reviews. Let's unmark this as experimental to solve a chichen and egg issue. Differential Revision: https://phab.mercurial-scm.org/D9823
Fri, 15 Jan 2021 12:08:07 +0530 share: rename share-safe warning config
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 15 Jan 2021 12:08:07 +0530] rev 46425
share: rename share-safe warning config Config introduced in previous patch was `share.source-safe-mismatch`. Let's rename the warn as `share.source-safe-mismatch.warn`. While we are here, made sure we have different configs for upgrade and downgrade. Differential Revision: https://phab.mercurial-scm.org/D9786
Mon, 18 Jan 2021 21:37:20 +0530 share: rework config options to be much clearer and easier
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 18 Jan 2021 21:37:20 +0530] rev 46424
share: rework config options to be much clearer and easier Recently I implemented various boolean configs which control how to behave when there is a share-safe mismatch between source and share repository. Mismatch means that source supports share-safe where as share does not or vice versa. However, while discussion and documentation we realized that it's too complicated and there are some combinations of values which makes no sense. We decided to introduce a config option with 4 possible values which makes controlling and understanding things easier. The config option `share.safe-mismatch.source-{not-}safe` can have following 4 values: * abort (default): error out if there is mismatch * allow: allow to work with respecting share source configuration * {up|down}grade-abort: try to {up|down}grade, if it fails, abort * {up|down}grade-allow: try to {up|down}grade, if it fails, continue in allow mode I am not sure if I can explain 3 config options which I deleted right now in just 5 lines which is a sign of how complex they became. No test changes demonstrate that functionality is same, only names have changed. Differential Revision: https://phab.mercurial-scm.org/D9785
Thu, 25 Mar 2021 19:06:28 -0400 typing: disable processing of mercurial/upgrade_utils/actions.py stable
Matt Harbison <matt_harbison@yahoo.com> [Thu, 25 Mar 2021 19:06:28 -0400] rev 46423
typing: disable processing of mercurial/upgrade_utils/actions.py There was a recent regression in pytype that causes processing to stall and consume memory, and it doesn't sound like it will be fixed any time soon. Differential Revision: https://phab.mercurial-scm.org/D10273
Fri, 26 Mar 2021 18:37:25 +0100 re2: feed unicode string to re2 module when necessary stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 26 Mar 2021 18:37:25 +0100] rev 46422
re2: feed unicode string to re2 module when necessary My previous test were using the `pyre2` Python project, that wrap the Google RE2 library in python as a `re2` module and accept bytes as input. However the `fb-re2` Python project is also offering a wrapping of the Google RE2 library in python as a `re2` module ans accept only unicode on python3. So we detect this situation and convert thing to unicode when necessary. Hooray… We should consider using a rust wrapping for regexp handling. We needs regexps in Rust anyway and this give use more control with less variants and more sanity. Differential Revision: https://phab.mercurial-scm.org/D10284
Sat, 13 Mar 2021 02:09:23 -0500 typing: rewrite a conditional assignment to unconfuse pytype stable
Matt Harbison <matt_harbison@yahoo.com> [Sat, 13 Mar 2021 02:09:23 -0500] rev 46421
typing: rewrite a conditional assignment to unconfuse pytype Otherwise, pytype and PyCharm flags it: File "/mnt/c/Users/Matt/hg/mercurial/localrepo.py", line 2903, in wlock: No attribute 'held' on _weakref.ReferenceType[nothing] [attribute-error] In Optional[Union[Any, _weakref.ReferenceType[nothing]]] File "/mnt/c/Users/Matt/hg/mercurial/localrepo.py", line 2904, in wlock: No attribute 'lock' on _weakref.ReferenceType[nothing] [attribute-error] In Optional[Union[Any, _weakref.ReferenceType[nothing]]] Differential Revision: https://phab.mercurial-scm.org/D10215
Sat, 13 Mar 2021 02:07:34 -0500 typing: add assertions to localrepo.py to appease pytype stable
Matt Harbison <matt_harbison@yahoo.com> [Sat, 13 Mar 2021 02:07:34 -0500] rev 46420
typing: add assertions to localrepo.py to appease pytype Differential Revision: https://phab.mercurial-scm.org/D10214
Fri, 12 Mar 2021 21:19:17 -0500 obsutil: maintain a homogenous list when computing successors stable
Matt Harbison <matt_harbison@yahoo.com> [Fri, 12 Mar 2021 21:19:17 -0500] rev 46419
obsutil: maintain a homogenous list when computing successors In practice, this wasn't a problem because of an internal check for an empty list, but it avoids the following pytype error: File "/mnt/c/Users/Matt/hg/mercurial/obsutil.py", line 823, in successorsandmarkers: No attribute 'markers' on List[nothing] [attribute-error] In Union[Any, List[nothing], _succs] Differential Revision: https://phab.mercurial-scm.org/D10213
Fri, 12 Mar 2021 23:28:56 -0500 typing: add an assertion to verify.py to appease pytype stable
Matt Harbison <matt_harbison@yahoo.com> [Fri, 12 Mar 2021 23:28:56 -0500] rev 46418
typing: add an assertion to verify.py to appease pytype Differential Revision: https://phab.mercurial-scm.org/D10212
Fri, 12 Mar 2021 20:25:12 -0500 typing: add an assertion to mercurial/hgweb/webcommands.py to help pytype stable
Matt Harbison <matt_harbison@yahoo.com> [Fri, 12 Mar 2021 20:25:12 -0500] rev 46417
typing: add an assertion to mercurial/hgweb/webcommands.py to help pytype I have no idea why this is needed, given the check immediately above. But without it, I'm getting this: File "/mnt/c/Users/Matt/hg/mercurial/hgweb/webcommands.py", line 1164, in filelog: Missing parameter 'toline' in call to function mercurial.dagop.blockdescendants [missing-parameter] Expected: (fctx, fromline, toline) Actually passed: (fctx, fromline) File "/mnt/c/Users/Matt/hg/mercurial/hgweb/webcommands.py", line 1166, in filelog: Missing parameter 'toline' in call to function mercurial.dagop.blockancestors [missing-parameter] Expected: (fctx, fromline, toline, followfirst) Actually passed: (fctx, fromline) Differential Revision: https://phab.mercurial-scm.org/D10211
Fri, 12 Mar 2021 19:02:07 -0500 crecord: null out the curses attribute with `None` on failure to import stable
Matt Harbison <matt_harbison@yahoo.com> [Fri, 12 Mar 2021 19:02:07 -0500] rev 46416
crecord: null out the curses attribute with `None` on failure to import Pytype got really confused that this could be `Union[module, bool]`, and spewed about tons of attributes that are not available on `bool`. Differential Revision: https://phab.mercurial-scm.org/D10210
Sat, 13 Mar 2021 00:41:37 -0500 typing: fix directives mangled by black stable
Matt Harbison <matt_harbison@yahoo.com> [Sat, 13 Mar 2021 00:41:37 -0500] rev 46415
typing: fix directives mangled by black Differential Revision: https://phab.mercurial-scm.org/D10209
Sat, 13 Mar 2021 00:40:46 -0500 typing: disable module attribute warnings for properly conditionalized code stable
Matt Harbison <matt_harbison@yahoo.com> [Sat, 13 Mar 2021 00:40:46 -0500] rev 46414
typing: disable module attribute warnings for properly conditionalized code Differential Revision: https://phab.mercurial-scm.org/D10208
Sat, 13 Mar 2021 00:38:59 -0500 typing: disable import error warnings that are already handled stable
Matt Harbison <matt_harbison@yahoo.com> [Sat, 13 Mar 2021 00:38:59 -0500] rev 46413
typing: disable import error warnings that are already handled I'm assuming that the cffi ones are handled somewhere, but the others definitely are. Differential Revision: https://phab.mercurial-scm.org/D10207
Fri, 12 Mar 2021 17:22:35 -0500 typing: disable a few errors when accessing Windows specific attributes stable
Matt Harbison <matt_harbison@yahoo.com> [Fri, 12 Mar 2021 17:22:35 -0500] rev 46412
typing: disable a few errors when accessing Windows specific attributes This is already guarded with conditionals. The entire win32 module is conditionally loaded. File "/mnt/c/Users/Matt/hg/mercurial/utils/procutil.py", line 162, in <module>: No attribute 'winstdout' on module 'mercurial.posix' [module-attr] File "/mnt/c/Users/Matt/hg/mercurial/utils/procutil.py", line 163, in <module>: No attribute 'winstdout' on module 'mercurial.posix' [module-attr] File "/mnt/c/Users/Matt/hg/mercurial/utils/procutil.py", line 174, in <module>: No attribute 'winstdout' on module 'mercurial.posix' [module-attr] File "/mnt/c/Users/Matt/hg/mercurial/utils/procutil.py", line 175, in <module>: No attribute 'winstdout' on module 'mercurial.posix' [module-attr] Differential Revision: https://phab.mercurial-scm.org/D10206
Fri, 12 Mar 2021 16:55:18 -0500 typing: disable a few errors calling py3.7+ functions in resourceutil.py stable
Matt Harbison <matt_harbison@yahoo.com> [Fri, 12 Mar 2021 16:55:18 -0500] rev 46411
typing: disable a few errors calling py3.7+ functions in resourceutil.py There's a graceful fallback when these methods are unavailable. Differential Revision: https://phab.mercurial-scm.org/D10205
Wed, 17 Mar 2021 12:06:49 +0100 formatting: fix redundant parentheses stable
Raphaël Gomès <rgomes@octobus.net> [Wed, 17 Mar 2021 12:06:49 +0100] rev 46410
formatting: fix redundant parentheses These were introduced by 0d055849d5f9d682ef931d2566b760d5c6bf7e52. Differential Revision: https://phab.mercurial-scm.org/D10229
Fri, 12 Mar 2021 20:19:12 -0500 wsgicgi: switch the default PATH_INFO back to str stable
Matt Harbison <matt_harbison@yahoo.com> [Fri, 12 Mar 2021 20:19:12 -0500] rev 46409
wsgicgi: switch the default PATH_INFO back to str It looks like everything here is meant to be str, and regressed in 687b865b95ad. Pytype didn't flag this, but is really confused about the range of possible types for the dictionary values, and flagged missing `lower()` on various types in this area. Differential Revision: https://phab.mercurial-scm.org/D10204
Fri, 12 Mar 2021 18:55:06 -0500 crecord: convert an instance of bytes to str stable
Matt Harbison <matt_harbison@yahoo.com> [Fri, 12 Mar 2021 18:55:06 -0500] rev 46408
crecord: convert an instance of bytes to str Caught by pytype: File "/mnt/c/Users/Matt/hg/mercurial/crecord.py", line 1154, in printstring: Function _CursesWindow.addstr was called with the wrong arguments [wrong-arg-types] Expected: (self, str: str, ...) Actually passed: (self, str: bytes, ...) Differential Revision: https://phab.mercurial-scm.org/D10203
Fri, 12 Mar 2021 18:51:22 -0500 crecord: change str literals to byte literals stable
Matt Harbison <matt_harbison@yahoo.com> [Fri, 12 Mar 2021 18:51:22 -0500] rev 46407
crecord: change str literals to byte literals Differential Revision: https://phab.mercurial-scm.org/D10202
Fri, 12 Mar 2021 17:59:02 -0500 bisect: replace a missing method on the list primitive stable
Matt Harbison <matt_harbison@yahoo.com> [Fri, 12 Mar 2021 17:59:02 -0500] rev 46406
bisect: replace a missing method on the list primitive Caught by pytype: File "/mnt/c/Users/Matt/hg/mercurial/commands.py", line 1095, in bisect: No attribute 'last' on list [attribute-error] In list Differential Revision: https://phab.mercurial-scm.org/D10201
Thu, 11 Mar 2021 21:09:55 -0500 typing: disable a module-attr warning in the worker module's py2 code stable
Matt Harbison <matt_harbison@yahoo.com> [Thu, 11 Mar 2021 21:09:55 -0500] rev 46405
typing: disable a module-attr warning in the worker module's py2 code Differential Revision: https://phab.mercurial-scm.org/D10183
Thu, 11 Mar 2021 21:07:04 -0500 wireprotoserver: convert ErrorResponse to bytes stable
Matt Harbison <matt_harbison@yahoo.com> [Thu, 11 Mar 2021 21:07:04 -0500] rev 46404
wireprotoserver: convert ErrorResponse to bytes Caught by pytype: File "/mnt/c/Users/Matt/hg/mercurial/wireprotoserver.py", line 236, in handlewsgirequest: Function _bytestr.__init__ was called with the wrong arguments [wrong-arg-types] Expected: (self, ints: Iterable[int]) Actually passed: (self, ints: mercurial.hgweb.common.ErrorResponse) The following methods aren't implemented on mercurial.hgweb.common.ErrorResponse: __iter__ File "/mnt/c/Users/Matt/hg/mercurial/wireprotoserver.py", line 239, in handlewsgirequest: Function _bytestr.__init__ was called with the wrong arguments [wrong-arg-types] Expected: (self, ints: Iterable[int]) Actually passed: (self, ints: mercurial.hgweb.common.ErrorResponse) The following methods aren't implemented on mercurial.hgweb.common.ErrorResponse: __iter__ File "/mnt/c/Users/Matt/hg/mercurial/wireprotov2server.py", line 91, in handlehttpv2request: Function _bytestr.__init__ was called with the wrong arguments [wrong-arg-types] Expected: (self, ints: Iterable[int]) Actually passed: (self, ints: mercurial.hgweb.common.ErrorResponse) The following methods aren't implemented on mercurial.hgweb.common.ErrorResponse: __iter__ Differential Revision: https://phab.mercurial-scm.org/D10182
Thu, 11 Mar 2021 21:02:03 -0500 verify: convert an exception to bytes before logging stable
Matt Harbison <matt_harbison@yahoo.com> [Thu, 11 Mar 2021 21:02:03 -0500] rev 46403
verify: convert an exception to bytes before logging I'm not entirely sure why this code appears to be trying to convert twice, but it was flagged by pytype: File "/mnt/c/Users/Matt/hg/mercurial/verify.py", line 84, in _exc: Function _bytestr.__init__ was called with the wrong arguments [wrong-arg-types] Expected: (self, ints: Iterable[int]) Actually passed: (self, ints: Exception) The following methods aren't implemented on Exception: __iter__ Differential Revision: https://phab.mercurial-scm.org/D10181
Thu, 11 Mar 2021 19:50:14 -0500 typing: add an assertion to the upgrade engine to help pytype stable
Matt Harbison <matt_harbison@yahoo.com> [Thu, 11 Mar 2021 19:50:14 -0500] rev 46402
typing: add an assertion to the upgrade engine to help pytype Differential Revision: https://phab.mercurial-scm.org/D10180
Thu, 11 Mar 2021 19:21:58 -0500 subrepo: handle unexpected file types from git gracefully stable
Matt Harbison <matt_harbison@yahoo.com> [Thu, 11 Mar 2021 19:21:58 -0500] rev 46401
subrepo: handle unexpected file types from git gracefully This was flagged by pytype because `tar.extractfile(...)` can return None if the entry is not a file or symlink. I don't think that git supports other types, but better safe than sorry. Differential Revision: https://phab.mercurial-scm.org/D10179
Thu, 11 Mar 2021 18:45:18 -0500 patch: convert a UI message to bytes when editing a patch stable
Matt Harbison <matt_harbison@yahoo.com> [Thu, 11 Mar 2021 18:45:18 -0500] rev 46400
patch: convert a UI message to bytes when editing a patch Differential Revision: https://phab.mercurial-scm.org/D10178
Thu, 11 Mar 2021 18:33:39 -0500 merge: force an exception message to bytes before printing as a warning stable
Matt Harbison <matt_harbison@yahoo.com> [Thu, 11 Mar 2021 18:33:39 -0500] rev 46399
merge: force an exception message to bytes before printing as a warning Caught by pytype: File "/mnt/c/Users/Matt/hg/mercurial/merge.py", line 1346, in batchremove: Function _bytestr.__init__ was called with the wrong arguments [wrong-arg-types] Expected: (self, ints: Iterable[int]) Actually passed: (self, ints: str) Differential Revision: https://phab.mercurial-scm.org/D10177
Thu, 11 Mar 2021 18:09:55 -0500 hg: convert an exception to bytes in the repo creation exception handler stable
Matt Harbison <matt_harbison@yahoo.com> [Thu, 11 Mar 2021 18:09:55 -0500] rev 46398
hg: convert an exception to bytes in the repo creation exception handler Caught by pytype: File "/mnt/c/Users/Matt/hg/mercurial/hg.py", line 77, in _local: Function _bytestr.__init__ was called with the wrong arguments [wrong-arg-types] Expected: (self, ints: Iterable[int]) Actually passed: (self, ints: Union[TypeError, ValueError]) Differential Revision: https://phab.mercurial-scm.org/D10176
Thu, 11 Mar 2021 17:55:52 -0500 typing: add an assertion instead of blacklisting mercurial/extensions.py stable
Matt Harbison <matt_harbison@yahoo.com> [Thu, 11 Mar 2021 17:55:52 -0500] rev 46397
typing: add an assertion instead of blacklisting mercurial/extensions.py Differential Revision: https://phab.mercurial-scm.org/D10175
Thu, 11 Mar 2021 17:27:31 -0500 debug: convert a few exceptions to bytes before wrapping in another error stable
Matt Harbison <matt_harbison@yahoo.com> [Thu, 11 Mar 2021 17:27:31 -0500] rev 46396
debug: convert a few exceptions to bytes before wrapping in another error Caught by pytype: File "/mnt/c/Users/Matt/hg/mercurial/debugcommands.py", line 2118, in debugmanifestfulltextcache: Function Abort.__init__ was called with the wrong arguments [wrong-arg-types] Expected: (self, message: Union[bytearray, bytes, memoryview], ...) Actually passed: (self, message: mercurial.error.LookupError, ...) File "/mnt/c/Users/Matt/hg/mercurial/debugcommands.py", line 2453, in debugobsolete: Function _bytestr.__init__ was called with the wrong arguments [wrong-arg-types] Expected: (self, ints: Iterable[int]) Actually passed: (self, ints: ValueError) The following methods aren't implemented on ValueError: __iter__ Differential Revision: https://phab.mercurial-scm.org/D10174
Thu, 11 Mar 2021 17:16:29 -0500 grep: convert an exception to bytes for a warning message stable
Matt Harbison <matt_harbison@yahoo.com> [Thu, 11 Mar 2021 17:16:29 -0500] rev 46395
grep: convert an exception to bytes for a warning message Caught by pytype: File "/mnt/c/Users/Matt/hg/mercurial/commands.py", line 3457, in grep: Function _bytestr.__init__ was called with the wrong arguments [wrong-arg-types] Expected: (self, ints: Iterable[int]) Actually passed: (self, ints: re.error) The following methods aren't implemented on re.error: __iter__ Differential Revision: https://phab.mercurial-scm.org/D10173
Thu, 11 Mar 2021 17:14:30 -0500 morestatus: convert a UI message about merge conflicts to bytes stable
Matt Harbison <matt_harbison@yahoo.com> [Thu, 11 Mar 2021 17:14:30 -0500] rev 46394
morestatus: convert a UI message about merge conflicts to bytes Differential Revision: https://phab.mercurial-scm.org/D10172
Thu, 11 Mar 2021 17:12:08 -0500 changegroup: convert a warning message to bytes stable
Matt Harbison <matt_harbison@yahoo.com> [Thu, 11 Mar 2021 17:12:08 -0500] rev 46393
changegroup: convert a warning message to bytes Differential Revision: https://phab.mercurial-scm.org/D10171
Thu, 11 Mar 2021 17:10:52 -0500 branchmap: force Exception to bytes before logging stable
Matt Harbison <matt_harbison@yahoo.com> [Thu, 11 Mar 2021 17:10:52 -0500] rev 46392
branchmap: force Exception to bytes before logging Here was an instance where `black` mangled the formatting so that `pytype` didn't recognize the suppression directive. But it seems that the error was correct, and the code should follow other recent changes around exception conversion. File "/mnt/c/Users/Matt/hg/mercurial/branchmap.py", line 303, in fromfile: Function _bytestr.__init__ was called with the wrong arguments [wrong-arg-types] Expected: (self, ints: Iterable[int]) Actually passed: (self, ints: Exception) The following methods aren't implemented on Exception: __iter__ Differential Revision: https://phab.mercurial-scm.org/D10170
Thu, 11 Mar 2021 17:05:37 -0500 nodemap: convert error message to bytes stable
Matt Harbison <matt_harbison@yahoo.com> [Thu, 11 Mar 2021 17:05:37 -0500] rev 46391
nodemap: convert error message to bytes Differential Revision: https://phab.mercurial-scm.org/D10169
Thu, 11 Mar 2021 17:04:58 -0500 mail: convert SMTPException to bytes before passing to error.Abort() stable
Matt Harbison <matt_harbison@yahoo.com> [Thu, 11 Mar 2021 17:04:58 -0500] rev 46390
mail: convert SMTPException to bytes before passing to error.Abort() Caught by pytype: File "/mnt/c/Users/Matt/hg/mercurial/mail.py", line 168, in _smtp: Function Abort.__init__ was called with the wrong arguments [wrong-arg-types] Expected: (self, message: Union[bytearray, bytes, memoryview], ...) Actually passed: (self, message: smtplib.SMTPException) Differential Revision: https://phab.mercurial-scm.org/D10168
Thu, 11 Mar 2021 17:02:28 -0500 typing: switch an argument type to the generic form stable
Matt Harbison <matt_harbison@yahoo.com> [Thu, 11 Mar 2021 17:02:28 -0500] rev 46389
typing: switch an argument type to the generic form This fixes the following pytype complaint: File "/mnt/c/Users/Matt/hg/mercurial/commands.py", line 4672, in log: Function mercurial.logcmdutil.parseopts was called with the wrong arguments [wrong-arg-types] Expected: (ui, pats: List[Union[bytearray, bytes, memoryview]], ...) Actually passed: (ui, pats: tuple, ...) Differential Revision: https://phab.mercurial-scm.org/D10167
Thu, 11 Mar 2021 21:25:28 -0500 typing: ensure that error.Abort is given bytes stable
Matt Harbison <matt_harbison@yahoo.com> [Thu, 11 Mar 2021 21:25:28 -0500] rev 46388
typing: ensure that error.Abort is given bytes There's a bunch more typing to be done here, but the list of things to fix is already long, and I know there are instances where this is being used incorrectly. Differential Revision: https://phab.mercurial-scm.org/D10166
Thu, 11 Mar 2021 21:21:41 -0500 typing: fix a suppression directive that was mangled by black formatting stable
Matt Harbison <matt_harbison@yahoo.com> [Thu, 11 Mar 2021 21:21:41 -0500] rev 46387
typing: fix a suppression directive that was mangled by black formatting It looks like black is moving comments needed by pytype out of position, and causing some things that should be disabled to be enforced anyway. Differential Revision: https://phab.mercurial-scm.org/D10165
Thu, 04 Mar 2021 17:35:58 +0530 commit: reorder if-else conditional to give mergestate info priority stable
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 04 Mar 2021 17:35:58 +0530] rev 46386
commit: reorder if-else conditional to give mergestate info priority Looking at the code now, I was unable to find a good reason as why we only rely on mergestate extras info after checking whether a filelog parent is ancestor of other or not. I mean if we have stored in mergestate that `other` was chosed, we should blindly pick that one. This cleanup will also help introduce more cases when both `fparent1` and `fparent2` are non-null but using info from mergestate, we can fastpath. The test change actually demonstrates the point of the patch. During merge we were getting the other side of the file but on commit we were marking that as merged. Differential Revision: https://phab.mercurial-scm.org/D10147
Wed, 10 Mar 2021 15:24:52 +1000 enclink: check contents of symlinks not just size in case of fcrypt stable
Corey Schuhen <cschuhen@topcon.com> [Wed, 10 Mar 2021 15:24:52 +1000] rev 46385
enclink: check contents of symlinks not just size in case of fcrypt Check content of symlinks because st_size may indicate the size of encrypted data which does not match actual link value. Differential Revision: https://phab.mercurial-scm.org/D10146
Tue, 09 Mar 2021 11:19:11 +0530 Added signature for changeset d5d9177c0045 stable
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 09 Mar 2021 11:19:11 +0530] rev 46384
Added signature for changeset d5d9177c0045
Tue, 09 Mar 2021 11:19:01 +0530 Added tag 5.7.1 for changeset d5d9177c0045 stable
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 09 Mar 2021 11:19:01 +0530] rev 46383
Added tag 5.7.1 for changeset d5d9177c0045
Mon, 08 Mar 2021 16:55:39 -0500 localrepo: fix conversion of exceptions to strings flagged by pytype stable 5.7.1
Matt Harbison <matt_harbison@yahoo.com> [Mon, 08 Mar 2021 16:55:39 -0500] rev 46382
localrepo: fix conversion of exceptions to strings flagged by pytype This is the same as e571fec5b606. I assume the 3 similar uses of `bytestr` in `__getitem__()` are OK (even though pytype also flags them), because there is apparently test coverage for 2 of the 3 cases. Differential Revision: https://phab.mercurial-scm.org/D10131
Mon, 08 Mar 2021 16:54:33 -0500 localrepo: fix a UI string to be bytes stable
Matt Harbison <matt_harbison@yahoo.com> [Mon, 08 Mar 2021 16:54:33 -0500] rev 46381
localrepo: fix a UI string to be bytes Flagged by pytype. Differential Revision: https://phab.mercurial-scm.org/D10130
Mon, 08 Mar 2021 12:28:53 -0500 pycompat: fix a bytes vs str issue in `unnamedtempfile()` stable
Matt Harbison <matt_harbison@yahoo.com> [Mon, 08 Mar 2021 12:28:53 -0500] rev 46380
pycompat: fix a bytes vs str issue in `unnamedtempfile()` This seems trivially correct, though the only two uses I found both took this path. So I'm guessing we're missing test coverage. Differential Revision: https://phab.mercurial-scm.org/D10129
Fri, 26 Feb 2021 15:34:22 +0530 patch: fix a formatting issue stable
Sushil khanchi <sushilkhanchi97@gmail.com> [Fri, 26 Feb 2021 15:34:22 +0530] rev 46379
patch: fix a formatting issue Differential Revision: https://phab.mercurial-scm.org/D10079
Tue, 02 Feb 2021 20:20:17 +0900 log: fix handling of root (or empty) path provided by matcher (issue6478) stable
Yuya Nishihara <yuya@tcha.org> [Tue, 02 Feb 2021 20:20:17 +0900] rev 46378
log: fix handling of root (or empty) path provided by matcher (issue6478) Since 27d6956d386b "match: use '' instead of '.' for root directory", '.' should be translated to ''. We can't blame repo.file() about this because an empty string is invalid as a file path, but I found at least two callers (_makematcher() and revset.filelog()) would crash because of this path[0]. So let's make repo.file() accept an empty string. path[0] == b'/' wouldn't work on Python 3 anyways.
Thu, 25 Feb 2021 15:18:00 +0530 tests: accept output changes by 33350debb480 stable
Sushil khanchi <sushilkhanchi97@gmail.com> [Thu, 25 Feb 2021 15:18:00 +0530] rev 46377
tests: accept output changes by 33350debb480 Differential Revision: https://phab.mercurial-scm.org/D10067
Fri, 19 Feb 2021 17:52:04 +0100 narrow: fix flaky behavior described in issue6150 stable
Raphaël Gomès <rgomes@octobus.net> [Fri, 19 Feb 2021 17:52:04 +0100] rev 46376
narrow: fix flaky behavior described in issue6150 This has been plaguing the CI for a good while, and it doesn't appear to have an easy fix proposed yet. The solution in this change is to always do an unambiguous (but expensive) lookup in case of comparison. This should always be correct, albeit suboptimal. Differential Revision: https://phab.mercurial-scm.org/D10034
Tue, 16 Feb 2021 15:44:51 +0530 patch: make diff --git to differentiate b/w file is empty or doesn't exists stable
Sushil khanchi <sushilkhanchi97@gmail.com> [Tue, 16 Feb 2021 15:44:51 +0530] rev 46375
patch: make diff --git to differentiate b/w file is empty or doesn't exists Before this patch, as we didn't differentiate the two cases of a file in a context: 1. File doesn't exists 2. File is empty which causes the blob id to be same for both the cases. Now we use `nullhex` for a file which doesn't exists in a context (aligning it with the git diff format) Changes in test file reflect the fixed behavior. Differential Revision: https://phab.mercurial-scm.org/D10001
Tue, 16 Feb 2021 15:37:19 +0530 tests: add a test to demonstrate a bug in `hg diff --git` (issue6486) stable
Sushil khanchi <sushilkhanchi97@gmail.com> [Tue, 16 Feb 2021 15:37:19 +0530] rev 46374
tests: add a test to demonstrate a bug in `hg diff --git` (issue6486) Issue url: https://bz.mercurial-scm.org/show_bug.cgi?id=6486 This will be fixed in next patch. Differential Revision: https://phab.mercurial-scm.org/D10000
Fri, 19 Feb 2021 10:04:53 -0500 helptext: fix a recent typo stable
Matt Harbison <matt_harbison@yahoo.com> [Fri, 19 Feb 2021 10:04:53 -0500] rev 46373
helptext: fix a recent typo Differential Revision: https://phab.mercurial-scm.org/D10033
Wed, 24 Feb 2021 15:16:22 +0100 re2: byteify some regex used to get check re2 availability stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 24 Feb 2021 15:16:22 +0100] rev 46372
re2: byteify some regex used to get check re2 availability Changeset 687b865b95ad failed to properly byteify this because it was a raw string. This went undetected so far because re2 does not seems to be widely tested. Differential Revision: https://phab.mercurial-scm.org/D10064
Wed, 10 Feb 2021 23:03:54 +0100 hooks: add a `auto` value for `hooks.*run-with-plain` stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 10 Feb 2021 23:03:54 +0100] rev 46371
hooks: add a `auto` value for `hooks.*run-with-plain` That setting restore the behavior pre-5.6. The current HGPLAIN value is simply passed to the hooks. This allow user who needs it to fully mitigate the behavior change introduced in Mercurial 5.7 by restoring the older behavior. Differential Revision: https://phab.mercurial-scm.org/D9982
Wed, 10 Feb 2021 23:21:21 +0100 hooks: introduce a `:run-with-plain` option for hooks stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 10 Feb 2021 23:21:21 +0100] rev 46370
hooks: introduce a `:run-with-plain` option for hooks This option control if HGPLAIN should be set or not for the hooks. This is the first step to give user some control of the HGPLAIN setting for they hooks. Some hooks (eg: consistency checking) deserve to be run with HGPLAIN, some other (eg: user set visual helper) might need to respect the user config and setting. So both usage are valid and we need to restore the ability to run -without- HGPLAIN that got lost in Mercurial 5.7. This does not offer a way to restore the pre-5.7 behavior yet (respect whatever HGPLAIN setting from the shell), this will be dealt with in the next changeset. The option name is a bit verbose because implementing this highlighs the need for another option: `:run-if-plain`. That would make it possible for some hooks to be easily disabled if HG PLAIN is set. However such option would be a new feature, not something introduced to mitigate a behavior change introduced in 5.7, so the `:run-if-plain` option belong to the default branch and is not part of this series. Differential Revision: https://phab.mercurial-scm.org/D9981
Wed, 10 Feb 2021 22:43:16 +0100 hooks: add some test about HGPLAIN setting and hooks stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 10 Feb 2021 22:43:16 +0100] rev 46369
hooks: add some test about HGPLAIN setting and hooks In Mercurial 5.7, hooks are now ran with HGPLAIN set, which is a behavior change in. I could not find explicit test about it so I am adding one. The next changesets will introduce more change to help user mitigate the behavior change when needed. Differential Revision: https://phab.mercurial-scm.org/D9979
Wed, 10 Feb 2021 21:05:05 +0100 hooks: forbid ':' in hook name stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 10 Feb 2021 21:05:05 +0100] rev 46368
hooks: forbid ':' in hook name The `:` character is a special separator in the config and it seems same do to the same for hooks. This is necessary to improve the experience around the HGPLAIN behavior change in 5.7. See next changesets for details. Differential Revision: https://phab.mercurial-scm.org/D9978
Wed, 10 Feb 2021 21:46:29 +0100 rust-status: honor matcher when using the dirstate-only fast-path (issue6483) stable
Raphaël Gomès <rgomes@octobus.net> [Wed, 10 Feb 2021 21:46:29 +0100] rev 46367
rust-status: honor matcher when using the dirstate-only fast-path (issue6483) Differential Revision: https://phab.mercurial-scm.org/D9977
Wed, 10 Feb 2021 22:01:23 +0100 status: add test that shows that the Rust implementation has a bug stable
Raphaël Gomès <rgomes@octobus.net> [Wed, 10 Feb 2021 22:01:23 +0100] rev 46366
status: add test that shows that the Rust implementation has a bug Differential Revision: https://phab.mercurial-scm.org/D9976
Wed, 10 Feb 2021 19:23:56 +0100 tweak-default: no longer enable the experimental return code stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 10 Feb 2021 19:23:56 +0100] rev 46365
tweak-default: no longer enable the experimental return code The change is quite new and undocumented (since it is experimental) so it seems premature to make it available in tweak default. In addition, I am not sure the new return code are frozen yet (eg: some of the initial feedback have not been incorporated). Before the release I doubled check (probably with Martin) that they were not enabled by default and got replied that they were only enabled in the tests. Have I been aware that they have been also enabled in tweak default I would I have lobbied to delay that. I discovered they were in tweak default from users feedback. They found it an unpleasant and unexpected surprise of 5.7. So I suggest we no enable enable this experimental feature for Mercurial 5.7 and revisit this later, when the feature will be more mature. Differential Revision: https://phab.mercurial-scm.org/D9975
Wed, 10 Feb 2021 00:11:46 +0100 cmdutil: add a missing byte prefix to string introduce in 976b26bdd0d8 stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 10 Feb 2021 00:11:46 +0100] rev 46364
cmdutil: add a missing byte prefix to string introduce in 976b26bdd0d8 The change is missing a the `b'foo'` prefix to make it a bytestring. This lead to a traceback in some third party extension. It is unclear to me why the Mercurial test pass without it. Differential Revision: https://phab.mercurial-scm.org/D9974
Mon, 18 Jan 2021 10:20:58 +0100 relnote: remove the reference to `debugstrip` stable
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 18 Jan 2021 10:20:58 +0100] rev 46363
relnote: remove the reference to `debugstrip` The `debug` namespace is not intended for end user and advertising it is a path to confusion and trouble. I think we should wait for the `admin` namespace to exists and the command to be available as `admin--strip` before we advertise it. Differential Revision: https://phab.mercurial-scm.org/D9817
Thu, 04 Feb 2021 16:59:46 -0500 largefiles: properly pass kwargs into url.open stable
Jordi Gutiérrez Hermoso <jordigh@octave.org> [Thu, 04 Feb 2021 16:59:46 -0500] rev 46362
largefiles: properly pass kwargs into url.open The url.open function has acquired a lot of kwargs over the years. When running `hg import http://example.com/hg/diff/1`, since at least a708e1e4d7a8 in March, 2018, the calling sites for url.open try to pass a `sendaccept` parameter that largefiles' override doesn't accept. Currently that stack traces something like this: Traceback (most recent call last): File "/tmp/hgtests.sv744r5t/install/bin/hg", line 59, in <module> dispatch.run() File "/tmp/hgtests.sv744r5t/install/lib/python/mercurial/dispatch.py", line 143, in run status = dispatch(req) File "/tmp/hgtests.sv744r5t/install/lib/python/mercurial/dispatch.py", line 245, in dispatch status = _rundispatch(req) File "/tmp/hgtests.sv744r5t/install/lib/python/mercurial/dispatch.py", line 289, in _rundispatch ret = _runcatch(req) or 0 File "/tmp/hgtests.sv744r5t/install/lib/python/mercurial/dispatch.py", line 465, in _runcatch return _callcatch(ui, _runcatchfunc) File "/tmp/hgtests.sv744r5t/install/lib/python/mercurial/dispatch.py", line 475, in _callcatch return scmutil.callcatch(ui, func) File "/tmp/hgtests.sv744r5t/install/lib/python/mercurial/scmutil.py", line 155, in callcatch return func() File "/tmp/hgtests.sv744r5t/install/lib/python/mercurial/dispatch.py", line 455, in _runcatchfunc return _dispatch(req) File "/tmp/hgtests.sv744r5t/install/lib/python/mercurial/dispatch.py", line 1259, in _dispatch lui, repo, cmd, fullargs, ui, options, d, cmdpats, cmdoptions File "/tmp/hgtests.sv744r5t/install/lib/python/mercurial/dispatch.py", line 913, in runcommand ret = _runcommand(ui, options, cmd, d) File "/tmp/hgtests.sv744r5t/install/lib/python/mercurial/dispatch.py", line 1270, in _runcommand return cmdfunc() File "/tmp/hgtests.sv744r5t/install/lib/python/mercurial/dispatch.py", line 1256, in <lambda> d = lambda: util.checksignature(func)(ui, *args, **strcmdopt) File "/tmp/hgtests.sv744r5t/install/lib/python/mercurial/util.py", line 1867, in check return func(*args, **kwargs) File "/tmp/hgtests.sv744r5t/install/lib/python/mercurial/commands.py", line 4184, in import_ patchfile = hg.openpath(ui, patchurl, sendaccept=False) File "/tmp/hgtests.sv744r5t/install/lib/python/mercurial/hg.py", line 181, in openpath return url.open(ui, path, sendaccept=sendaccept) TypeError: openlargefile() got an unexpected keyword argument 'sendaccept' So, just accept and pass along any kwargs of the overridden function.
Thu, 04 Feb 2021 19:56:45 +0900 procutil: extend gui test to detect wayland session (issue6479) stable
Yuya Nishihara <yuya@tcha.org> [Thu, 04 Feb 2021 19:56:45 +0900] rev 46361
procutil: extend gui test to detect wayland session (issue6479)
Tue, 02 Feb 2021 23:44:44 +0530 Added signature for changeset 0e2e7300f430 stable
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 02 Feb 2021 23:44:44 +0530] rev 46360
Added signature for changeset 0e2e7300f430
Tue, 02 Feb 2021 23:44:31 +0530 Added tag 5.7 for changeset 0e2e7300f430 stable
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 02 Feb 2021 23:44:31 +0530] rev 46359
Added tag 5.7 for changeset 0e2e7300f430
Fri, 29 Jan 2021 10:32:19 -0800 relnotes: copy "next" to "5.7" and clear "next" stable 5.7
Martin von Zweigbergk <martinvonz@google.com> [Fri, 29 Jan 2021 10:32:19 -0800] rev 46358
relnotes: copy "next" to "5.7" and clear "next" The same procedure as every year^Wcycle. Differential Revision: https://phab.mercurial-scm.org/D9909
Mon, 01 Feb 2021 15:37:03 -0500 relnotes: elaborate on the side effects of hooks having HGPLAIN=1 stable
Matt Harbison <matt_harbison@yahoo.com> [Mon, 01 Feb 2021 15:37:03 -0500] rev 46357
relnotes: elaborate on the side effects of hooks having HGPLAIN=1 Differential Revision: https://phab.mercurial-scm.org/D9943
Sun, 31 Jan 2021 19:56:52 -0500 packaging: replace a documentation reference to `python3` on Windows stable
Matt Harbison <matt_harbison@yahoo.com> [Sun, 31 Jan 2021 19:56:52 -0500] rev 46356
packaging: replace a documentation reference to `python3` on Windows Sadly, there's not `python3.exe` on Windows. Differential Revision: https://phab.mercurial-scm.org/D9937
Wed, 27 Jan 2021 10:29:21 -0800 wix: tell ComponentSearch that it is finding a directory (not a file) stable
Kyle Lippincott <spectral@google.com> [Wed, 27 Jan 2021 10:29:21 -0800] rev 46355
wix: tell ComponentSearch that it is finding a directory (not a file) This is to fix an issue we've noticed where fresh installations start at `C:\Program Files\Mercurial`, and then upgrades "walk up" the tree and end up in `C:\Program Files` and finally `C:\` (where they stay). ComponentSearch defaults to finding files, which I think means "it produces a string like `C:\Program Files\Mercurial`", whereas with the type being explicitly a directory, it would return `C:\Program Files\Mercurial\` (note the final trailing backslash). Presumably, a latter step then tries to turn that file name into a proper directory, by removing everything after the last `\`. This could likely also be fixed by actually searching for the component for hg.exe itself. That seemed a lot more complicated, as the GUID for hg.exe isn't known in this file (it's one of the "auto-derived" ones). We could also consider adding a Condition that I think could check the Property and ensure it's either empty or ends in a trailing slash, but that would be an installer runtime check and I'm not convinced it'd actually be useful. This will *not* cause existing installations that are in one of the bad directories to fix themselves. Doing that would require a fair amount more understanding of wix and windows installer than I have, and it *probably* wouldn't be possible to be 100% correct about it either (there's nothing preventing a user from intentionally installing it in C:\, though I don't know why they would do so). If someone wants to tackle fixing existing installations, I think that the first installation is actually the only one that shows up in "Add or Remove Programs", and that its registry keys still exist. You might be able to find something under HKEY_USERS that lists both the "good" and the "bad" InstallDirs. Mine was under `HKEY_USERS\S-1-5-18\Software\Mercurial\InstallDir` (C:\), and `HKEY_USERS\S-1-5-21-..numbers..\Software\Mercurial\InstallDir` (C:\Program Files\Mercurial). If you find exactly two, with one being the default path, and the other being a prefix of it, the user almost certainly hit this bug :D We had originally thought that this bug might be due to unattended installations/upgrades, but I no longer think that's the case. We were able to reproduce the issue by uninstalling all copies of Mercurial I could find, installing one version (it chose the correct location), and then starting the installer for a different version (higher or lower didn't matter). I did not need to deal with an unattended or headless installation/upgrade to trigger the issue, but it's possible that my system was "primed" for this bug to happen because of a previous unattended installation/upgrade. Differential Revision: https://phab.mercurial-scm.org/D9891
Wed, 27 Jan 2021 00:54:57 -0500 copyright: update to 2021 stable
Matt Harbison <matt_harbison@yahoo.com> [Wed, 27 Jan 2021 00:54:57 -0500] rev 46354
copyright: update to 2021 Differential Revision: https://phab.mercurial-scm.org/D9885
Thu, 28 Jan 2021 13:15:34 +0100 persistent-nodemap: Fix Rust declarations for Revlog_CAPI signatures stable
Simon Sapin <simon.sapin@octobus.net> [Thu, 28 Jan 2021 13:15:34 +0100] rev 46353
persistent-nodemap: Fix Rust declarations for Revlog_CAPI signatures Use Rust’s `libc::ssize_t` as the closest match to C’s `Py_ssize_t`. See details in test comment. Going forward we should find a way to have such Rust declarations auto-generated from C headers at build time, or auto-checked against them in a test. Differential Revision: https://phab.mercurial-scm.org/D9901
(0) -30000 -10000 -3000 -1000 -120 +120 +1000 +3000 tip