Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/patch.py @ 43439:eab0b7383cd3 stable
patch: fix a str + bytes issue in an exception handler
Flagged by pytype.
Differential Revision: https://phab.mercurial-scm.org/D7466
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Thu, 21 Nov 2019 14:28:28 -0500 |
parents | a5b04863dbff |
children | 7eb701e355bd |
comparison
equal
deleted
inserted
replaced
43438:aff3f6e407a1 | 43439:eab0b7383cd3 |
---|---|
2288 backend.setfile(gp.path, data, mode, gp.oldpath) | 2288 backend.setfile(gp.path, data, mode, gp.oldpath) |
2289 continue | 2289 continue |
2290 try: | 2290 try: |
2291 current_file = patcher(ui, gp, backend, store, eolmode=eolmode) | 2291 current_file = patcher(ui, gp, backend, store, eolmode=eolmode) |
2292 except PatchError as inst: | 2292 except PatchError as inst: |
2293 ui.warn(str(inst) + b'\n') | 2293 ui.warn(stringutil.forcebytestr(inst) + b'\n') |
2294 current_file = None | 2294 current_file = None |
2295 rejects += 1 | 2295 rejects += 1 |
2296 continue | 2296 continue |
2297 elif state == b'git': | 2297 elif state == b'git': |
2298 for gp in values: | 2298 for gp in values: |