[PATCH 1 of 2] hgweb: make 'branches' template split branches by status

Matt Mackall mpm at selenic.com
Sun Feb 10 10:43:41 CST 2013

On Mon, 2013-02-04 at 13:56 -0200, Antonio Zanardo wrote:
> # HG changeset patch
> # User Antonio Zanardo <zanardo at gmail.com>
> # Date 1359989550 7200
> # Node ID c4dd3efdf2246f8d80813ea84d7c9f0b45eb046c
> # Parent  7068089c95a2ff3c1b536bbb52ca6bc1f06fc06e
> hgweb: make 'branches' template split branches by status
> This is the initial work on webcommands.py branches() to allow hgweb templates
> to split branches list by status or entirely hide closed branches, for example.

Huh, so what is the current state here?

It appears that we:
- list all branch heads
- sort by open vs closed
- sort by rev
- display open / closed / inactive

This is.. unfortunate. We should probably not show closed branches at
all and we've long considered active/inactive to be a meaningless and
outdated concept (starting the day we introduced closed branches).

We should instead:

- list only open branch heads
- sort by rev

This can in fact be done today purely in templates, with something like:

{ifeq(status, 'closed', '', '{branch}....'}

And we can have separate lists using something like the above as well.
Perhaps an on-click method to show closed branches would be better than
a session variable.

Mathematics is the supreme nostalgia of our time.

More information about the Mercurial-devel mailing list