mirror of
https://github.com/facebook/sapling.git
synced 2024-10-12 01:39:21 +03:00
remotebookmarks: add new template keyword for just bookmarks
This commit is contained in:
parent
083e914e6b
commit
f2527b3047
@ -410,6 +410,21 @@ def remotedistance(context, mapping, args):
|
|||||||
|
|
||||||
return calculateremotedistance(repo, ctx, remote)
|
return calculateremotedistance(repo, ctx, remote)
|
||||||
|
|
||||||
|
def remotebookmarkskw(**args):
|
||||||
|
""":remotebookmarks: List of strings. List of remote bookmarks associated with
|
||||||
|
the changeset.
|
||||||
|
|
||||||
|
"""
|
||||||
|
repo, ctx = args['repo'], args['ctx']
|
||||||
|
|
||||||
|
remotebooks = [name for name in
|
||||||
|
repo.names['remotenames'].names(repo, ctx.node())
|
||||||
|
if _remotetypes[name] == 'bookmarks']
|
||||||
|
|
||||||
|
return templatekw.showlist('remotebookmark', remotebooks,
|
||||||
|
plural='remotebookmarks', **args)
|
||||||
|
|
||||||
templatekw.keywords['preferredremotenames'] = preferredremotenameskw
|
templatekw.keywords['preferredremotenames'] = preferredremotenameskw
|
||||||
templatekw.keywords['remotedistance'] = remotedistancekw
|
templatekw.keywords['remotedistance'] = remotedistancekw
|
||||||
|
templatekw.keywords['remotebookmarks'] = remotebookmarkskw
|
||||||
templater.funcs['remotedistance'] = remotedistance
|
templater.funcs['remotedistance'] = remotedistance
|
||||||
|
Loading…
Reference in New Issue
Block a user