##// END OF EJS Templates
py3: add a __str__ method to Abort...
Denis Laxalde -
r43720:40bf3d7e stable
parent child Browse files
Show More
@@ -111,6 +111,9 b' class Abort(Hint, Exception):'
111 111
112 112 __bytes__ = _tobytes
113 113
114 def __str__(self):
115 return pycompat.sysstr(self.__bytes__())
116
114 117
115 118 class HookLoadError(Abort):
116 119 """raised when loading a hook fails, aborting an operation
@@ -209,12 +209,12 b' Ensure the data got to the server OK'
209 209 insertflagprocessor(flag, processor, flagprocessors)
210 210 File "*/mercurial/revlogutils/flagutil.py", line *, in insertflagprocessor (glob)
211 211 raise error.Abort(msg)
212 mercurial.error.Abort: b"cannot register multiple processors on flag '0x8'." (py3 !)
212 mercurial.error.Abort: cannot register multiple processors on flag '0x8'. (py3 !)
213 213 Abort: cannot register multiple processors on flag '0x8'. (no-py3 !)
214 214 *** failed to set up extension duplicate: cannot register multiple processors on flag '0x8'.
215 215 $ hg st 2>&1 | egrep 'cannot register multiple processors|flagprocessorext'
216 216 File "*/tests/flagprocessorext.py", line *, in extsetup (glob)
217 mercurial.error.Abort: b"cannot register multiple processors on flag '0x8'." (py3 !)
217 mercurial.error.Abort: cannot register multiple processors on flag '0x8'. (py3 !)
218 218 Abort: cannot register multiple processors on flag '0x8'. (no-py3 !)
219 219 *** failed to set up extension duplicate: cannot register multiple processors on flag '0x8'.
220 220 File "*/tests/flagprocessorext.py", line *, in b64decode (glob)
@@ -988,7 +988,7 b' test python hooks'
988 988 ModuleNotFoundError: No module named 'hgext_syntaxerror' (py36 !)
989 989 Traceback (most recent call last): (py3 !)
990 990 HookLoadError: preoutgoing.syntaxerror hook is invalid: import of "syntaxerror" failed (no-py3 !)
991 mercurial.error.HookLoadError: b'preoutgoing.syntaxerror hook is invalid: import of "syntaxerror" failed' (py3 !)
991 mercurial.error.HookLoadError: preoutgoing.syntaxerror hook is invalid: import of "syntaxerror" failed (py3 !)
992 992 abort: preoutgoing.syntaxerror hook is invalid: import of "syntaxerror" failed
993 993
994 994 $ echo '[hooks]' > ../a/.hg/hgrc
@@ -1161,7 +1161,7 b' make sure --traceback works on hook impo'
1161 1161 ModuleNotFoundError: No module named 'hgext_importfail' (py36 !)
1162 1162 Traceback (most recent call last):
1163 1163 HookLoadError: precommit.importfail hook is invalid: import of "importfail" failed (no-py3 !)
1164 mercurial.error.HookLoadError: b'precommit.importfail hook is invalid: import of "importfail" failed' (py3 !)
1164 mercurial.error.HookLoadError: precommit.importfail hook is invalid: import of "importfail" failed (py3 !)
1165 1165 abort: precommit.importfail hook is invalid: import of "importfail" failed
1166 1166
1167 1167 Issue1827: Hooks Update & Commit not completely post operation
@@ -355,7 +355,7 b' Test a checksum failure during the proce'
355 355 $LOCALIP - - [$ERRDATE$] HG error: super(badstore, self).download(oid, src) (glob)
356 356 $LOCALIP - - [$ERRDATE$] HG error: _(b'corrupt remote lfs object: %s') % oid (glob)
357 357 $LOCALIP - - [$ERRDATE$] HG error: LfsCorruptionError: corrupt remote lfs object: b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c (no-py3 !)
358 $LOCALIP - - [$ERRDATE$] HG error: hgext.lfs.blobstore.LfsCorruptionError: b'corrupt remote lfs object: b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c' (py3 !)
358 $LOCALIP - - [$ERRDATE$] HG error: hgext.lfs.blobstore.LfsCorruptionError: corrupt remote lfs object: b5bb9d8014a0f9b1d61e21e796d78dccdf1352f23cd32812f4850b878ae4944c (py3 !)
359 359 $LOCALIP - - [$ERRDATE$] HG error: (glob)
360 360 $LOCALIP - - [$ERRDATE$] Exception happened during processing request '/.hg/lfs/objects/276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d': (glob)
361 361 Traceback (most recent call last):
@@ -378,7 +378,7 b' Test a checksum failure during the proce'
378 378 $LOCALIP - - [$ERRDATE$] HG error: blobstore._verify(oid, b'dummy content') (glob)
379 379 $LOCALIP - - [$ERRDATE$] HG error: hint=_(b'run hg verify'), (glob)
380 380 $LOCALIP - - [$ERRDATE$] HG error: LfsCorruptionError: detected corrupt lfs object: 276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d (no-py3 !)
381 $LOCALIP - - [$ERRDATE$] HG error: hgext.lfs.blobstore.LfsCorruptionError: b'detected corrupt lfs object: 276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d' (py3 !)
381 $LOCALIP - - [$ERRDATE$] HG error: hgext.lfs.blobstore.LfsCorruptionError: detected corrupt lfs object: 276f73cfd75f9fb519810df5f5d96d6594ca2521abd86cbcd92122f7d51a1f3d (py3 !)
382 382 $LOCALIP - - [$ERRDATE$] HG error: (glob)
383 383
384 384 Basic Authorization headers are returned by the Batch API, and sent back with
@@ -85,7 +85,7 b' Known exception should be caught, but pr'
85 85 $ hg --config "extensions.t=$abspath" --config 'worker.numcpus=8' \
86 86 > test 100000.0 abort --traceback 2>&1 | egrep '(SystemExit|Abort)'
87 87 raise error.Abort(b'known exception')
88 mercurial.error.Abort: b'known exception' (py3 !)
88 mercurial.error.Abort: known exception (py3 !)
89 89 Abort: known exception (no-py3 !)
90 90 SystemExit: 255
91 91
General Comments 0
You need to be logged in to leave comments. Login now