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 -10 +10 +100 +300 +1000 +3000 tip