[PATCH 03 of 14] bookmarks: Raise util.Abort instead of Exception

Joel Rosdahl joel at rosdahl.net
Sat Oct 25 10:18:36 CDT 2008


# HG changeset patch
# User Joel Rosdahl <joel at rosdahl.net>
# Date 1224947613 -7200
# Node ID dbce8e42b0fd0eaff5e24bb62935fd5b235c4c1c
# Parent  444d88175e33c21d508083585038e02523c4e912
bookmarks: Raise util.Abort instead of Exception

diff --git a/hgext/bookmarks.py b/hgext/bookmarks.py
--- a/hgext/bookmarks.py
+++ b/hgext/bookmarks.py
@@ -95,7 +95,7 @@
 
     if mark != None:
         if mark.strip().count("\n") > 0:
-            raise Exception("bookmark cannot contain newlines")
+            raise util.Abort("bookmark cannot contain newlines")
         if mark in marks and not force:
             raise util.Abort(_("a bookmark of the same name already exists"))
         if ((mark in repo.branchtags() or mark == repo.dirstate.branch())


More information about the Mercurial-devel mailing list