D4733: py3: cast exception to bytes

2018-09-26 Thread indygreg (Gregory Szorc)
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGbce1c1af7518: py3: cast exception to bytes (authored by 
indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D4733?vs=11361=11370

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

AFFECTED FILES
  mercurial/wireprotoframing.py

CHANGE DETAILS

diff --git a/mercurial/wireprotoframing.py b/mercurial/wireprotoframing.py
--- a/mercurial/wireprotoframing.py
+++ b/mercurial/wireprotoframing.py
@@ -827,9 +827,10 @@
 break
 
 except Exception as e:
-for frame in createerrorframe(stream, requestid,
-  '%s' % e,
-  errtype='server'):
+for frame in createerrorframe(
+stream, requestid, '%s' % stringutil.forcebytestr(e),
+errtype='server'):
+
 yield frame
 
 break



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


D4733: py3: cast exception to bytes

2018-09-25 Thread indygreg (Gregory Szorc)
indygreg updated this revision to Diff 11361.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D4733?vs=11350=11361

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

AFFECTED FILES
  mercurial/wireprotoframing.py

CHANGE DETAILS

diff --git a/mercurial/wireprotoframing.py b/mercurial/wireprotoframing.py
--- a/mercurial/wireprotoframing.py
+++ b/mercurial/wireprotoframing.py
@@ -827,9 +827,10 @@
 break
 
 except Exception as e:
-for frame in createerrorframe(stream, requestid,
-  '%s' % e,
-  errtype='server'):
+for frame in createerrorframe(
+stream, requestid, '%s' % stringutil.forcebytestr(e),
+errtype='server'):
+
 yield frame
 
 break



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


D4733: py3: cast exception to bytes

2018-09-25 Thread indygreg (Gregory Szorc)
indygreg updated this revision to Diff 11350.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D4733?vs=11343=11350

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

AFFECTED FILES
  mercurial/wireprotoframing.py

CHANGE DETAILS

diff --git a/mercurial/wireprotoframing.py b/mercurial/wireprotoframing.py
--- a/mercurial/wireprotoframing.py
+++ b/mercurial/wireprotoframing.py
@@ -21,6 +21,7 @@
 from . import (
 encoding,
 error,
+pycompat,
 util,
 )
 from .utils import (
@@ -827,9 +828,10 @@
 break
 
 except Exception as e:
-for frame in createerrorframe(stream, requestid,
-  '%s' % e,
-  errtype='server'):
+for frame in createerrorframe(
+stream, requestid, '%s' % stringutil.forcebytestr(e),
+errtype='server'):
+
 yield frame
 
 break



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


D4733: py3: cast exception to bytes

2018-09-24 Thread indygreg (Gregory Szorc)
indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  In order to appease Python 3.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/wireprotoframing.py

CHANGE DETAILS

diff --git a/mercurial/wireprotoframing.py b/mercurial/wireprotoframing.py
--- a/mercurial/wireprotoframing.py
+++ b/mercurial/wireprotoframing.py
@@ -21,6 +21,7 @@
 from . import (
 encoding,
 error,
+pycompat,
 util,
 )
 from .utils import (
@@ -827,9 +828,10 @@
 break
 
 except Exception as e:
-for frame in createerrorframe(stream, requestid,
-  '%s' % e,
-  errtype='server'):
+for frame in createerrorframe(
+stream, requestid, '%s' % pycompat.bytestr(str(e)),
+errtype='server'):
+
 yield frame
 
 break



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