diff -r 448725a2ef73 -r 61714510220d mercurial/error.py --- a/mercurial/error.py Fri Sep 15 00:01:57 2017 -0700 +++ b/mercurial/error.py Sun Sep 03 16:45:33 2017 +0900 @@ -115,6 +115,9 @@ """Raised when parsing config files and {rev,file}sets (msg[, pos])""" __bytes__ = _tobytes +class PatchError(Exception): + __bytes__ = _tobytes + class UnknownIdentifier(ParseError): """Exception raised when a {rev,file}set references an unknown identifier"""