mercurial/bookmarks.py
changeset 29354 af849596752c
parent 29300 f92afd23a099
child 30481 0a3b11a7489a
--- a/mercurial/bookmarks.py	Mon Jun 13 05:11:56 2016 +0900
+++ b/mercurial/bookmarks.py	Mon Jun 13 23:50:26 2016 +0200
@@ -17,6 +17,7 @@
 )
 from . import (
     encoding,
+    error,
     lock as lockmod,
     obsolete,
     util,
@@ -154,7 +155,10 @@
 
     def expandname(self, bname):
         if bname == '.':
-            return self.active
+            if self.active:
+                return self.active
+            else:
+                raise error.Abort(_("no active bookmark"))
         return bname
 
 def _readactive(repo, marks):