bookmarks: Require new bookmark name when renaming
authorJoel Rosdahl <joel@rosdahl.net>
Sat, 25 Oct 2008 19:05:52 +0200
changeset 7254 d892211d670e
parent 7253 8b81d1e2dc04
child 7255 69e431ea124d
bookmarks: Require new bookmark name when renaming
hgext/bookmarks.py
--- a/hgext/bookmarks.py	Sat Oct 25 19:05:52 2008 +0200
+++ b/hgext/bookmarks.py	Sat Oct 25 19:05:52 2008 +0200
@@ -81,6 +81,8 @@
             raise util.Abort(_("a bookmark of this name does not exist"))
         if mark in marks and not force:
             raise util.Abort(_("a bookmark of the same name already exists"))
+        if mark is None:
+            raise util.Abort(_("new bookmark name required"))
         marks[mark] = marks[move]
         del marks[move]
         write(repo, marks)