mercurial/templatekw.py
changeset 25387 390a10b7843b
parent 25348 f26efa4f0eff
child 25393 eb52de500d2a
equal deleted inserted replaced
25386:a5a95642144b 25387:390a10b7843b
   228     return showactivebookmark(**args)
   228     return showactivebookmark(**args)
   229 
   229 
   230 def showactivebookmark(**args):
   230 def showactivebookmark(**args):
   231     """:activetbookmark: String. The active bookmark, if it is
   231     """:activetbookmark: String. The active bookmark, if it is
   232     associated with the changeset"""
   232     associated with the changeset"""
   233     import bookmarks as bookmarks # to avoid circular import issues
   233     active = args['repo']._activebookmark
   234     repo = args['repo']
   234     if active and active in args['ctx'].bookmarks():
   235     if bookmarks.isactivewdirparent(repo):
   235         return active
   236         active = repo._activebookmark
       
   237         if active in args['ctx'].bookmarks():
       
   238             return active
       
   239     return ''
   236     return ''
   240 
   237 
   241 def showdate(repo, ctx, templ, **args):
   238 def showdate(repo, ctx, templ, **args):
   242     """:date: Date information. The date when the changeset was committed."""
   239     """:date: Date information. The date when the changeset was committed."""
   243     return ctx.date()
   240     return ctx.date()