mercurial/commands.py
changeset 14485 610873cf064a
parent 14466 bd34a027f3ed
child 14494 1ffeeb91c55d
--- a/mercurial/commands.py	Tue May 31 15:55:23 2011 -0500
+++ b/mercurial/commands.py	Tue May 31 11:52:22 2011 -0700
@@ -3655,10 +3655,11 @@
     if modheads == 0:
         return
     if optupdate:
-        if (modheads <= 1 or len(repo.branchheads()) == 1) or checkout:
+        try:
             return hg.update(repo, checkout)
-        else:
-            ui.status(_("not updating, since new heads added\n"))
+        except util.Abort, inst:
+            ui.warn(_("not updating: %s\n" % str(inst)))
+            return 0
     if modheads > 1:
         currentbranchheads = len(repo.branchheads())
         if currentbranchheads == modheads: