Skip to content
Snippets Groups Projects
Commit bd274393 authored by Anton Shestakov's avatar Anton Shestakov
Browse files

context: add instabilities() method to basefilectx

This method is now used in webutils.commonentry(), which adds common data items
(commit hash, author, date, etc) for rendering changesets in hgweb. Usually,
commonentry() is given a changectx as ctx; but in views related to files (e.g.
file view, diff, annotate) it's replaced by a filectx, so the latter also needs
to have instabilities() method.
parent 1ac4c088
No related branches found
No related tags found
No related merge requests found
......@@ -821,6 +821,8 @@
return self._changectx.phasestr()
def obsolete(self):
return self._changectx.obsolete()
def instabilities(self):
return self._changectx.instabilities()
def manifest(self):
return self._changectx.manifest()
def changectx(self):
......
......@@ -362,6 +362,7 @@
'extra': ctx.extra(),
'phase': ctx.phasestr(),
'obsolete': ctx.obsolete(),
'instabilities': [{"name": i} for i in ctx.instabilities()],
'branch': nodebranchnodefault(ctx),
'inbranch': nodeinbranch(repo, ctx),
'branches': nodebranchdict(repo, ctx),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment