diff --git a/mercurial/error.py b/mercurial/error.py --- a/mercurial/error.py +++ b/mercurial/error.py @@ -62,3 +62,6 @@ class SignalInterrupt(KeyboardInterrupt) class SignatureError(Exception): pass + +class Abort(Exception): + """Raised if a command needs to print an error and exit.""" diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -333,8 +333,7 @@ def increasingchunks(source, min=1024, m if buf: yield ''.join(buf) -class Abort(Exception): - """Raised if a command needs to print an error and exit.""" +Abort = error.Abort def always(fn): return True def never(fn): return False