[PATCH] hgweb: show obsolescence status of a commit

Augie Fackler raf at durin42.com
Fri Nov 17 13:00:29 EST 2017


On Fri, Nov 17, 2017 at 04:39:16PM +0800, Anton Shestakov wrote:
> # HG changeset patch
> # User Anton Shestakov <av6 at dwimlabs.net>
> # Date 1510906994 -28800
> #      Fri Nov 17 16:23:14 2017 +0800
> # Node ID 6ff29042647acd6d5f938b0e321afe4ce7df5508
> # Parent  f1e997d4a24fb59ddd33c3780104dc002f870f5c
> # EXP-Topic hgweb-more-info
> hgweb: show obsolescence status of a commit
>
> A new method is added to basefilectx class because filectx and changectx are
> used interchangeably in hgweb views related to files (e.g. file view, diff,
> annotate).
>
> As with phases, spartan theme shows a simple "obsolete: yes" on its own line
> (this allows replacing "yes" with something more useful in future, like output
> of obsfate* template functions). In gitweb and monoblue the element has gray
> background, in paper and coal the element is gray with a dashed underline.
>
> diff --git a/mercurial/context.py b/mercurial/context.py
> --- a/mercurial/context.py
> +++ b/mercurial/context.py
> @@ -819,6 +819,8 @@ class basefilectx(object):
>          return self._changectx.phase()
>      def phasestr(self):
>          return self._changectx.phasestr()
> +    def obsolete(self):
> +        return self._changectx.obsolete()

My only comment is to send the context.py as a standalone change, but
even that's not really a hard requirement.

I like the feature, go ahead and send v2?


More information about the Mercurial-devel mailing list