mercurial/templatekw.py
changeset 25387 390a10b7843b
parent 25348 f26efa4f0eff
child 25393 eb52de500d2a
--- a/mercurial/templatekw.py	Sun May 24 18:30:27 2015 +0900
+++ b/mercurial/templatekw.py	Wed Apr 15 09:07:54 2015 -0700
@@ -230,12 +230,9 @@
 def showactivebookmark(**args):
     """:activetbookmark: String. The active bookmark, if it is
     associated with the changeset"""
-    import bookmarks as bookmarks # to avoid circular import issues
-    repo = args['repo']
-    if bookmarks.isactivewdirparent(repo):
-        active = repo._activebookmark
-        if active in args['ctx'].bookmarks():
-            return active
+    active = args['repo']._activebookmark
+    if active and active in args['ctx'].bookmarks():
+        return active
     return ''
 
 def showdate(repo, ctx, templ, **args):