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

login
register
mail settings
Submitter Anton Shestakov
Date Sept. 1, 2015, 5:15 p.m.
Message ID <e47aaa412a3390206b54.1441127721@neuro>
Download mbox | patch
Permalink /patch/10349/
State Accepted
Headers show

Comments

Anton Shestakov - Sept. 1, 2015, 5:15 p.m.
# HG changeset patch
# User Anton Shestakov <av6@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

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.
Augie Fackler - Sept. 1, 2015, 5:37 p.m.
On Wed, Sep 02, 2015 at 01:15:21AM +0800, Anton Shestakov wrote:
> # HG changeset patch
> # User Anton Shestakov <av6@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@selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel

Patch

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',