[PATCH 07 of 14] bookmarks: Require new bookmark name when renaming
Joel Rosdahl
joel at rosdahl.net
Sat Oct 25 12:09:20 CDT 2008
# HG changeset patch
# User Joel Rosdahl <joel at rosdahl.net>
# Date 1224954352 -7200
# Node ID 0bed73480127fdddf831ae54b84eb96c84b87dca
# Parent efbe9370dc893d210e3b8256023bfc58a21de5f4
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 @@
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)
More information about the Mercurial-devel
mailing list