Patchwork D2613: cmdutil: ensure PatchError messages are coerded to bytes, not str

login
register
mail settings
Submitter phabricator
Date March 3, 2018, 11 p.m.
Message ID <dcf6cb06c8b76e3f415f117da54f1e01@localhost.localdomain>
Download mbox | patch
Permalink /patch/28864/
State Not Applicable
Headers show

Comments

phabricator - March 3, 2018, 11 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG2dce0049176c: cmdutil: ensure PatchError messages are coerded to bytes, not str (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2613?vs=6491&id=6498

REVISION DETAIL
  https://phab.mercurial-scm.org/D2613

AFFECTED FILES
  mercurial/cmdutil.py

CHANGE DETAILS




To: durin42, #hg-reviewers, indygreg
Cc: mercurial-devel

Patch

diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -1478,7 +1478,7 @@ 
                     patch.patchrepo(ui, repo, p1, store, tmpname, strip, prefix,
                                     files, eolmode=None)
                 except error.PatchError as e:
-                    raise error.Abort(str(e))
+                    raise error.Abort(util.forcebytestr(e))
                 if opts.get('exact'):
                     editor = None
                 else: