# HG changeset patch # User Joel Rosdahl # Date 2008-10-25 17:05:52 # Node ID eb91b9ce2c196bbeaac72873a242d6f8979d0d6c # Parent 18c23375861fadf42178615dbde30c194bb9d6f6 bookmarks: Strip bookmark names of whitespace, just like tag names diff --git a/hgext/bookmarks.py b/hgext/bookmarks.py --- a/hgext/bookmarks.py +++ b/hgext/bookmarks.py @@ -100,6 +100,7 @@ def bookmark(ui, repo, mark=None, rev=No 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())