# HG changeset patch # User Yuya Nishihara <y...@tcha.org> # Date 1572956980 -32400 # Tue Nov 05 21:29:40 2019 +0900 # Branch stable # Node ID ea5b708e3f51afe6591d7e595a7bcdd5e909cfc1 # Parent a77338d2bdabb7aa81bb275b3794de7707843545 py3: do not reimplement Abort.__str__() on Python 2
It isn't necessary on Python 2, and the default implementation should be better than our BaseException_str() clone. diff --git a/mercurial/error.py b/mercurial/error.py --- a/mercurial/error.py +++ b/mercurial/error.py @@ -111,8 +111,10 @@ class Abort(Hint, Exception): __bytes__ = _tobytes - def __str__(self): - return pycompat.sysstr(self.__bytes__()) + if pycompat.ispy3: + + def __str__(self): + return pycompat.sysstr(self.__bytes__()) class HookLoadError(Abort): _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel