# HG changeset patch # User Joel Rosdahl # Date 2008-10-25 17:05:52 # Node ID d892211d670e9d59ea2ee7f857151e62c3144aa0 # Parent 8b81d1e2dc04e34206965836fee3edd4d6ff8ef6 bookmarks: Require new bookmark name when renaming diff --git a/hgext/bookmarks.py b/hgext/bookmarks.py --- a/hgext/bookmarks.py +++ b/hgext/bookmarks.py @@ -81,6 +81,8 @@ def bookmark(ui, repo, mark=None, rev=No raise util.Abort(_("a bookmark of this name does not exist")) if mark in marks and not force: raise util.Abort(_("a bookmark of the same name already exists")) + if mark is None: + raise util.Abort(_("new bookmark name required")) marks[mark] = marks[move] del marks[move] write(repo, marks)