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
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
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
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
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
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
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 09 Mar 2021 11:19:11 +0530] rev 46384
Added signature for changeset d5d9177c0045
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 09 Mar 2021 11:19:01 +0530] rev 46383
Added tag 5.7.1 for changeset d5d9177c0045
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
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