mercurial/bookmarks.py
changeset 20100 0f01d0692bc5
parent 20098 2880b45636ca
child 20281 67ee87a371b2
--- a/mercurial/bookmarks.py	Fri Nov 15 18:31:02 2013 -0800
+++ b/mercurial/bookmarks.py	Fri Nov 15 18:41:40 2013 -0800
@@ -106,13 +106,13 @@
     Set the name of the bookmark that we are on (hg update <bookmark>).
     The name is recorded in .hg/bookmarks.current
     '''
+    if mark not in repo._bookmarks:
+        raise AssertionError('bookmark %s does not exist!' % mark)
+
     current = repo._bookmarkcurrent
     if current == mark:
         return
 
-    if mark not in repo._bookmarks:
-        mark = ''
-
     wlock = repo.wlock()
     try:
         file = repo.opener('bookmarks.current', 'w', atomictemp=True)