Wed, 20 Jan 2021 18:35:12 +0100 cext: add support for revlogv2
Raphaël Gomès <rgomes@octobus.net> [Wed, 20 Jan 2021 18:35:12 +0100] rev 46708
cext: add support for revlogv2 This enables the C code to retrieve/create entries in the revlog v2 format. This is mainly a matter of taking into account the additional slots for sidedata, etc. Differential Revision: https://phab.mercurial-scm.org/D9846
Mon, 18 Jan 2021 10:43:12 +0100 bitmanipulation: add utils to read/write bigendian 64bit integers
Raphaël Gomès <rgomes@octobus.net> [Mon, 18 Jan 2021 10:43:12 +0100] rev 46707
bitmanipulation: add utils to read/write bigendian 64bit integers Differential Revision: https://phab.mercurial-scm.org/D9845
Thu, 04 Mar 2021 09:55:06 +0100 format: remove sidedata format variant
Raphaël Gomès <rgomes@octobus.net> [Thu, 04 Mar 2021 09:55:06 +0100] rev 46706
format: remove sidedata format variant This format variant can only exist when also using revlog v2, so it's useless now. Differential Revision: https://phab.mercurial-scm.org/D10113
Wed, 20 Jan 2021 21:14:06 +0100 revlogv2: allow upgrading to v2
Raphaël Gomès <rgomes@octobus.net> [Wed, 20 Jan 2021 21:14:06 +0100] rev 46705
revlogv2: allow upgrading to v2 Revlogv2 implies sidedata. Right now sidedata is not really used in production, and Revlogv2 will be used for the first production-ready version of sidedata support. Differential Revision: https://phab.mercurial-scm.org/D9844
Thu, 28 Jan 2021 15:28:57 +0100 revlog: introduce v2 format
Raphaël Gomès <rgomes@octobus.net> [Thu, 28 Jan 2021 15:28:57 +0100] rev 46704
revlog: introduce v2 format As documented in [1], this is still tentative and could be subject to change, but we need to lay down the foundations in order to work on the next abstraction layers. [1] https://www.mercurial-scm.org/wiki/RevlogV2Plan Differential Revision: https://phab.mercurial-scm.org/D9843
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 46703
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 46702
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 46701
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 46700
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 46699
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 46698
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 46697
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 46696
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 46695
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 46694
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 46693
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 46692
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 46691
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 46690
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 46689
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 46688
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 46687
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 46686
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 46685
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 46684
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 46683
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 46682
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 46681
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 46680
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 46679
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
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -30 +30 +50 +100 +300 +1000 +3000 tip