[PATCH] hgweb: remove an extra call to nodebranchnodefault() in changesetentry()

Augie Fackler raf at durin42.com
Tue May 26 10:17:24 CDT 2015


On Tue, May 26, 2015 at 10:58:59PM +0800, Anton Shestakov wrote:
> # HG changeset patch
> # User Anton Shestakov <engored at ya.ru>
> # Date 1432652310 -28800
> #      Tue May 26 22:58:30 2015 +0800
> # Node ID 2b7406cc18592445a8d37b4ff53549bedaba3c94
> # Parent  605b1d32c1c011d56233f28923ee5354fce7e426
> hgweb: remove an extra call to nodebranchnodefault() in changesetentry()

Queued this, many thanks.

>
> showbranch variable already contains the result of nodebranchnodefault(ctx), so
> it can be reused.
>
> diff --git a/mercurial/hgweb/webutil.py b/mercurial/hgweb/webutil.py
> --- a/mercurial/hgweb/webutil.py
> +++ b/mercurial/hgweb/webutil.py
> @@ -331,7 +331,7 @@ def changesetentry(web, req, tmpl, ctx):
>          archives=web.archivelist(ctx.hex()),
>          tags=nodetagsdict(web.repo, ctx.node()),
>          bookmarks=nodebookmarksdict(web.repo, ctx.node()),
> -        branch=nodebranchnodefault(ctx),
> +        branch=showbranch,
>          inbranch=nodeinbranch(web.repo, ctx),
>          branches=nodebranchdict(web.repo, ctx))
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list