[PATCH 07 of 11] hgweb: explictly pass basectx in webutil.diffs

Yuya Nishihara yuya at tcha.org
Fri Feb 24 11:27:05 EST 2017


On Wed, 22 Feb 2017 16:10:01 +0100, Denis Laxalde wrote:
> # HG changeset patch
> # User Denis Laxalde <denis.laxalde at logilab.fr>
> # Date 1484670348 -3600
> #      Tue Jan 17 17:25:48 2017 +0100
> # Node ID b3f8ef870003ee2ca6b6db70860a065f255902b7
> # Parent  ddf1b3d89b595aa5b376bb51a8edf458b8f1b1c8
> # EXP-Topic linerange-log/hgweb-filelog
> hgweb: explictly pass basectx in webutil.diffs
> 
> There's only one case where `basectx` parameter is None (over two usages), so
> it's probably not worth handling the special case as it makes code-reading
> harder.
> 
> Along the way, use ctx.p1() instead of checking for ctx.parents() being empty
> which should not occur.

Nice cleanup. Queued this, thanks.


More information about the Mercurial-devel mailing list