Mercurial > hg
comparison mercurial/context.py @ 48762:d5121df04808
rank: add context and template keyword
This makes the stored rank property accessible, to be expanded and printed.
Differential Revision: https://phab.mercurial-scm.org/D12140
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Fri, 28 Jan 2022 11:35:41 +0100 |
parents | 576040155dba |
children | 6000f5b25c9b |
comparison
equal
deleted
inserted
replaced
48761:2e949ede7350 | 48762:d5121df04808 |
---|---|
681 return self._repo.nodetags(self._node) | 681 return self._repo.nodetags(self._node) |
682 | 682 |
683 def bookmarks(self): | 683 def bookmarks(self): |
684 """Return a list of byte bookmark names.""" | 684 """Return a list of byte bookmark names.""" |
685 return self._repo.nodebookmarks(self._node) | 685 return self._repo.nodebookmarks(self._node) |
686 | |
687 def fast_rank(self): | |
688 repo = self._repo | |
689 if self._maybe_filtered: | |
690 cl = repo.changelog | |
691 else: | |
692 cl = repo.unfiltered().changelog | |
693 return cl.fast_rank(self._rev) | |
686 | 694 |
687 def phase(self): | 695 def phase(self): |
688 return self._repo._phasecache.phase(self._repo, self._rev) | 696 return self._repo._phasecache.phase(self._repo, self._rev) |
689 | 697 |
690 def hidden(self): | 698 def hidden(self): |