Mercurial > public > mercurial-scm > hg
comparison mercurial/merge.py @ 46692:39f23d20ea47 stable
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
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Thu, 11 Mar 2021 18:33:39 -0500 |
parents | 89a2afe31e82 |
children | e2f7b2695ba1 |
comparison
equal
deleted
inserted
replaced
46691:1099541b6462 | 46692:39f23d20ea47 |
---|---|
18 modifiednodeid, | 18 modifiednodeid, |
19 nullid, | 19 nullid, |
20 nullrev, | 20 nullrev, |
21 ) | 21 ) |
22 from .thirdparty import attr | 22 from .thirdparty import attr |
23 from .utils import stringutil | |
23 from . import ( | 24 from . import ( |
24 copies, | 25 copies, |
25 encoding, | 26 encoding, |
26 error, | 27 error, |
27 filemerge, | 28 filemerge, |
1339 try: | 1340 try: |
1340 wctx[f].remove(ignoremissing=True) | 1341 wctx[f].remove(ignoremissing=True) |
1341 except OSError as inst: | 1342 except OSError as inst: |
1342 repo.ui.warn( | 1343 repo.ui.warn( |
1343 _(b"update failed to remove %s: %s!\n") | 1344 _(b"update failed to remove %s: %s!\n") |
1344 % (f, pycompat.bytestr(inst.strerror)) | 1345 % (f, stringutil.forcebytestr(inst.strerror)) |
1345 ) | 1346 ) |
1346 if i == 100: | 1347 if i == 100: |
1347 yield i, f | 1348 yield i, f |
1348 i = 0 | 1349 i = 0 |
1349 i += 1 | 1350 i += 1 |