diff --git a/rhodecode/lib/vcs/backends/hg/commit.py b/rhodecode/lib/vcs/backends/hg/commit.py --- a/rhodecode/lib/vcs/backends/hg/commit.py +++ b/rhodecode/lib/vcs/backends/hg/commit.py @@ -160,6 +160,17 @@ class MercurialCommit(base.BaseCommit): return self._make_commits(parents) @LazyProperty + def phase(self): + phase_id = self._remote.ctx_phase(self.idx) + phase_text = { + 0: 'public', + 1: 'draft', + 2: 'secret', + }.get(phase_id) or '' + + return safe_unicode(phase_text) + + @LazyProperty def children(self): """ Returns list of child commits. diff --git a/rhodecode/public/css/tags.less b/rhodecode/public/css/tags.less --- a/rhodecode/public/css/tags.less +++ b/rhodecode/public/css/tags.less @@ -98,4 +98,12 @@ &.admin { &:extend(.tag5); } -} \ No newline at end of file +} + +.phase-draft { + color: @color3 +} + +.phase-secret { + color:@grey3 +} diff --git a/rhodecode/templates/changelog/changelog_elements.mako b/rhodecode/templates/changelog/changelog_elements.mako --- a/rhodecode/templates/changelog/changelog_elements.mako +++ b/rhodecode/templates/changelog/changelog_elements.mako @@ -48,6 +48,11 @@ ${h.show_id(commit)} + % if hasattr(commit, 'phase'): + % if commit.phase != 'public': + ${commit.phase} + % endif + % endif