##// END OF EJS Templates
templatekw: display active bookmark more consistently (issue4552) (BC)...
Ryan McElroy -
r25387:390a10b7 default
parent child Browse files
Show More
@@ -230,12 +230,9 b' def showcurrentbookmark(**args):'
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):
@@ -193,3 +193,12 b' analogous to hg book -i <active bookmark'
193 $ hg up -q .
193 $ hg up -q .
194 $ test -f .hg/bookmarks.current
194 $ test -f .hg/bookmarks.current
195 [1]
195 [1]
196
197 issue 4552 -- simulate a pull moving the active bookmark
198
199 $ hg up -q X
200 $ printf "Z" > .hg/bookmarks.current
201 $ hg log -T '{activebookmark}\n' -r Z
202 Z
203 $ hg log -T '{bookmarks % "{active}\n"}' -r Z
204 Z
General Comments 0
You need to be logged in to leave comments. Login now