hgext/bookmarks.py
changeset 11705 e95bacedae12
parent 11682 f54ec9c70877
parent 11704 18c47562d331
child 11774 91c4e6d2c9e5
--- a/hgext/bookmarks.py	Thu Jul 29 10:39:59 2010 +0900
+++ b/hgext/bookmarks.py	Thu Jul 29 12:10:22 2010 +0900
@@ -136,6 +136,9 @@
         if "\n" in mark:
             raise util.Abort(_("bookmark name cannot contain newlines"))
         mark = mark.strip()
+        if not mark:
+            raise util.Abort(_("bookmark names cannot consist entirely of "
+                               "whitespace"))
         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())