diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -5196,7 +5196,7 @@ def postincoming(ui, repo, modheads, opt updata = destutil.destupdate(repo) checkout, movemarkfrom, brev = updata ret = hg.update(repo, checkout) - except error.Abort as inst: + except error.UpdateAbort as inst: ui.warn(_("not updating: %s\n") % str(inst)) if inst.hint: ui.warn(_("(%s)\n") % inst.hint) diff --git a/mercurial/destutil.py b/mercurial/destutil.py --- a/mercurial/destutil.py +++ b/mercurial/destutil.py @@ -84,10 +84,10 @@ def destupdate(repo, clean=False, check= msg = _("uncommitted changes") hint = _("commit and merge, or update --clean to" " discard changes") - raise error.Abort(msg, hint=hint) + raise error.UpdateAbort(msg, hint=hint) elif not check: # destination is not a descendant. msg = _("not a linear update") hint = _("merge or update --check to force update") - raise error.Abort(msg, hint=hint) + raise error.UpdateAbort(msg, hint=hint) return rev, movemark, activemark diff --git a/mercurial/error.py b/mercurial/error.py --- a/mercurial/error.py +++ b/mercurial/error.py @@ -66,6 +66,9 @@ class HookAbort(Abort): class ConfigError(Abort): """Exception raised when parsing config files""" +class UpdateAbort(Abort): + """Raised when an update is aborted for destination issue""" + class OutOfBandError(Exception): """Exception raised when a remote repo reports failure"""