bookmarks: Strip bookmark names of whitespace, just like tag names
authorJoel Rosdahl <joel@rosdahl.net>
Sat, 25 Oct 2008 19:05:52 +0200
changeset 7260 eb91b9ce2c19
parent 7259 18c23375861f
child 7261 4ba89b6d0e05
bookmarks: Strip bookmark names of whitespace, just like tag names
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
@@ -100,6 +100,7 @@
     if mark != None:
         if "\n" in mark:
             raise util.Abort(_("bookmark name cannot contain newlines"))
+        mark = mark.strip()
         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())