D2292: scmutil: bytes-ify IOErrors before wrapping them in abort message

2018-02-17 Thread durin42 (Augie Fackler)
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG2b00dda6dad9: scmutil: bytes-ify IOErrors before wrapping 
them in abort message (authored by durin42, committed by ).

CHANGED PRIOR TO COMMIT
  https://phab.mercurial-scm.org/D2292?vs=5813&id=5815#toc

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2292?vs=5813&id=5815

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

AFFECTED FILES
  mercurial/scmutil.py

CHANGE DETAILS

diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
--- a/mercurial/scmutil.py
+++ b/mercurial/scmutil.py
@@ -215,7 +215,7 @@
 ui.warn(_("(is your Python install correct?)\n"))
 except IOError as inst:
 if util.safehasattr(inst, "code"):
-ui.warn(_("abort: %s\n") % inst)
+ui.warn(_("abort: %s\n") % util.forcebytestr(inst))
 elif util.safehasattr(inst, "reason"):
 try: # usually it is in the form (errno, strerror)
 reason = inst.reason.args[1]



To: durin42, #hg-reviewers, yuja
Cc: pulkit, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D2292: scmutil: bytes-ify IOErrors before wrapping them in abort message

2018-02-17 Thread durin42 (Augie Fackler)
durin42 updated this revision to Diff 5813.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2292?vs=5797&id=5813

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

AFFECTED FILES
  mercurial/scmutil.py

CHANGE DETAILS

diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
--- a/mercurial/scmutil.py
+++ b/mercurial/scmutil.py
@@ -215,7 +215,7 @@
 ui.warn(_("(is your Python install correct?)\n"))
 except IOError as inst:
 if util.safehasattr(inst, "code"):
-ui.warn(_("abort: %s\n") % inst)
+ui.warn(_("abort: %s\n") % pycompat.forcebytestr(inst))
 elif util.safehasattr(inst, "reason"):
 try: # usually it is in the form (errno, strerror)
 reason = inst.reason.args[1]



To: durin42, #hg-reviewers, yuja
Cc: pulkit, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D2292: scmutil: bytes-ify IOErrors before wrapping them in abort message

2018-02-17 Thread pulkit (Pulkit Goyal)
pulkit added a comment.


  It's recommended using `util.forcebytestr()` to convert error messages to 
bytes. https://phab.mercurial-scm.org/D2269#inline-5791

REPOSITORY
  rHG Mercurial

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

To: durin42, #hg-reviewers
Cc: pulkit, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D2292: scmutil: bytes-ify IOErrors before wrapping them in abort message

2018-02-16 Thread durin42 (Augie Fackler)
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/scmutil.py

CHANGE DETAILS

diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
--- a/mercurial/scmutil.py
+++ b/mercurial/scmutil.py
@@ -215,7 +215,7 @@
 ui.warn(_("(is your Python install correct?)\n"))
 except IOError as inst:
 if util.safehasattr(inst, "code"):
-ui.warn(_("abort: %s\n") % inst)
+ui.warn(_("abort: %s\n") % pycompat.bytestr(inst))
 elif util.safehasattr(inst, "reason"):
 try: # usually it is in the form (errno, strerror)
 reason = inst.reason.args[1]



To: durin42, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel