hgext/bookmarks.py
changeset 11705 e95bacedae12
parent 11682 f54ec9c70877
parent 11704 18c47562d331
child 11774 91c4e6d2c9e5
equal deleted inserted replaced
11703:55a2af02e45c 11705:e95bacedae12
   134 
   134 
   135     if mark != None:
   135     if mark != None:
   136         if "\n" in mark:
   136         if "\n" in mark:
   137             raise util.Abort(_("bookmark name cannot contain newlines"))
   137             raise util.Abort(_("bookmark name cannot contain newlines"))
   138         mark = mark.strip()
   138         mark = mark.strip()
       
   139         if not mark:
       
   140             raise util.Abort(_("bookmark names cannot consist entirely of "
       
   141                                "whitespace"))
   139         if mark in marks and not force:
   142         if mark in marks and not force:
   140             raise util.Abort(_("a bookmark of the same name already exists"))
   143             raise util.Abort(_("a bookmark of the same name already exists"))
   141         if ((mark in repo.branchtags() or mark == repo.dirstate.branch())
   144         if ((mark in repo.branchtags() or mark == repo.dirstate.branch())
   142             and not force):
   145             and not force):
   143             raise util.Abort(
   146             raise util.Abort(