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

durin42 (Augie Fackler) phabricator at mercurial-scm.org
Sat Mar 3 18:00:41 EST 2018


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

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:



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


More information about the Mercurial-devel mailing list