diff mercurial/commands.py @ 26683:634666c48b7d

update: introduce a 'UpdateAbort' exception The 'postincoming' function used by 'hg pull --update' and 'hg unbundle' is catching 'Abort' exceptions to intercept failed update. This feel a bit too wide to me, so I'm introducing a more precise exception to specify update destination issues.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Mon, 05 Oct 2015 04:26:26 -0700
parents 71a485130beb
children 76f20fc8d54d
line wrap: on
line diff
--- a/mercurial/commands.py	Mon Oct 05 21:42:09 2015 -0700
+++ b/mercurial/commands.py	Mon Oct 05 04:26:26 2015 -0700
@@ -5196,7 +5196,7 @@
                 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)