changeset 15490:875bb46e35ea

bookmark: same order for options and code
author Kevin Bullock <kbullock@ringworld.org>
date Wed, 17 Aug 2011 08:49:40 -0500
parents 25ea33fe7e5c
children c0e42b47ec1a
files mercurial/commands.py
diffstat 1 files changed, 11 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Tue Nov 15 14:33:06 2011 -0600
+++ b/mercurial/commands.py	Wed Aug 17 08:49:40 2011 -0500
@@ -739,6 +739,17 @@
     marks = repo._bookmarks
     cur   = repo.changectx('.').node()
 
+    if delete:
+        if mark is None:
+            raise util.Abort(_("bookmark name required"))
+        if mark not in marks:
+            raise util.Abort(_("bookmark '%s' does not exist") % mark)
+        if mark == repo._bookmarkcurrent:
+            bookmarks.setcurrent(repo, None)
+        del marks[mark]
+        bookmarks.write(repo)
+        return
+
     if rename:
         if rename not in marks:
             raise util.Abort(_("bookmark '%s' does not exist") % rename)
@@ -754,17 +765,6 @@
         bookmarks.write(repo)
         return
 
-    if delete:
-        if mark is None:
-            raise util.Abort(_("bookmark name required"))
-        if mark not in marks:
-            raise util.Abort(_("bookmark '%s' does not exist") % mark)
-        if mark == repo._bookmarkcurrent:
-            bookmarks.setcurrent(repo, None)
-        del marks[mark]
-        bookmarks.write(repo)
-        return
-
     if mark is not None:
         if "\n" in mark:
             raise util.Abort(_("bookmark name cannot contain newlines"))