Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/cmdutil.py @ 36692:2dce0049176c
cmdutil: ensure PatchError messages are coerded to bytes, not str
Differential Revision: https://phab.mercurial-scm.org/D2613
author | Augie Fackler <augie@google.com> |
---|---|
date | Sat, 03 Mar 2018 17:09:26 -0500 |
parents | c6061cadb400 |
children | 390d16ea7c76 |
comparison
equal
deleted
inserted
replaced
36691:3715a5ffcf92 | 36692:2dce0049176c |
---|---|
1476 files = set() | 1476 files = set() |
1477 try: | 1477 try: |
1478 patch.patchrepo(ui, repo, p1, store, tmpname, strip, prefix, | 1478 patch.patchrepo(ui, repo, p1, store, tmpname, strip, prefix, |
1479 files, eolmode=None) | 1479 files, eolmode=None) |
1480 except error.PatchError as e: | 1480 except error.PatchError as e: |
1481 raise error.Abort(str(e)) | 1481 raise error.Abort(util.forcebytestr(e)) |
1482 if opts.get('exact'): | 1482 if opts.get('exact'): |
1483 editor = None | 1483 editor = None |
1484 else: | 1484 else: |
1485 editor = getcommiteditor(editform='import.bypass') | 1485 editor = getcommiteditor(editform='import.bypass') |
1486 memctx = context.memctx(repo, (p1.node(), p2.node()), | 1486 memctx = context.memctx(repo, (p1.node(), p2.node()), |