[PATCH 13 of 14] bookmarks: Strip bookmark names of whitespace, just like tag names
Joel Rosdahl
joel at rosdahl.net
Sat Oct 25 17:09:26 UTC 2008
# HG changeset patch
# User Joel Rosdahl <joel at rosdahl.net>
# Date 1224954352 -7200
# Node ID 1d007df029010afc5dc7882fe6e6e0078f7053cb
# Parent 1766b4879249725c5be42b8c543aa75b1686f040
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 @@
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())
More information about the Mercurial-devel
mailing list