--- a/hgext/bookmarks.py Sun Mar 01 00:30:01 2009 +0100
+++ b/hgext/bookmarks.py Fri Feb 27 02:01:45 2009 -0800
@@ -100,7 +100,7 @@
refs = parse(repo)
# do not update if we do update to a rev equal to the current bookmark
- if (mark not in refs and
+ if (mark and mark not in refs and
current(repo) and refs[current(repo)] == repo.changectx('.').node()):
return
if mark not in refs:
@@ -146,6 +146,8 @@
raise util.Abort(_("bookmark name required"))
if mark not in marks:
raise util.Abort(_("a bookmark of this name does not exist"))
+ if mark == current(repo):
+ setcurrent(repo, None)
del marks[mark]
write(repo, marks)
return