diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -136,6 +136,9 @@ def unique(g): class Abort(Exception): """Raised if a command needs to print an error and exit.""" +class UnexpectedOutput(Abort): + """Raised to print an error with part of output and exit.""" + def always(fn): return True def never(fn): return False