[PATCH 2 of 2 V2] hgweb: explain instabilities of unstable changesets

Yuya Nishihara yuya at tcha.org
Tue Feb 27 07:01:18 EST 2018


On Mon, 26 Feb 2018 22:05:27 +0800, Anton Shestakov wrote:
> # HG changeset patch
> # User Anton Shestakov <av6 at dwimlabs.net>
> # Date 1519649061 -28800
> #      Mon Feb 26 20:44:21 2018 +0800
> # Node ID 026f4c5a52a0070c5b712cad247818e6566d4748
> # Parent  0aa1728931cc2c2c7d6ee0f18e0618fc17add42a
> hgweb: explain instabilities of unstable changesets
> 
> Let's bikeshed a bit more before I touch other hgweb styles or start adding
> non-hgweb template keywords/functions:
> 
> - I like "explainunstable", but it works as a function name, and not so much as
>   a keyword name. Other options so far are: whyunstable, reasonsunstable,
>   unstablereasons, unstablesources.

"whyunstable" or "unstablereasons" seems good to me. The latter can imply it
returns a list.

> - What would be the best way to implement this feature in regular templates?
>   Since there can be multiple instabilities, it needs to be a list, and then
>   content-divergent changesets also have a list of divergent nodes... Is there
>   a better way to do this than what's done in this patch?

Perhaps that depends on how we want to write a template. If we want to list
reasons per instability for example, it's probably better to return a dict
of lists.

  unstablereasons.orphan % '{node} {reason} ...'
  unstablereasons.contentdivergent % '{divergentnodes % "{node}"} {reason} ...'


More information about the Mercurial-devel mailing list