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
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -32 +32 +50 +100 +300 +1000 +3000 tip