[PATCH 3 of 3] hgweb: limit branches shown on summary page to 10

Augie Fackler raf at durin42.com
Tue Sep 1 12:37:53 CDT 2015


On Wed, Sep 02, 2015 at 01:15:21AM +0800, Anton Shestakov wrote:
> # HG changeset patch
> # User Anton Shestakov <av6 at dwimlabs.net>
> # Date 1441121706 -28800
> #      Tue Sep 01 23:35:06 2015 +0800
> # Node ID e47aaa412a3390206b54bcf110f154319642a379
> # Parent  332cbab89527dc6a47a83bced72d947aaaf92ef6
> hgweb: limit branches shown on summary page to 10

queued these, many thanks

>
> Tags and bookmarks on summary page are already limited to 10, let's limit
> branches as well.
>
> Each of the blocks (tags, bookmarks, branches) currently has a link to the full
> list.
>
> diff --git a/mercurial/hgweb/webcommands.py b/mercurial/hgweb/webcommands.py
> --- a/mercurial/hgweb/webcommands.py
> +++ b/mercurial/hgweb/webcommands.py
> @@ -724,7 +724,7 @@ def summary(web, req, tmpl):
>                  lastchange=tip.date(),
>                  tags=tagentries,
>                  bookmarks=bookmarks,
> -                branches=webutil.branchentries(web.repo, web.stripecount),
> +                branches=webutil.branchentries(web.repo, web.stripecount, 10),
>                  shortlog=changelist,
>                  node=tip.hex(),
>                  symrev='tip',
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list