[PATCH 1 of 2 STABLE] hgweb: fix empty navigation detection

Matt Mackall mpm at selenic.com
Tue Apr 30 13:15:03 CDT 2013


On Tue, 2013-04-30 at 15:15 +0200, pierre-yves.david at logilab.fr wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david at logilab.fr>
> # Date 1367327472 -7200
> #      Tue Apr 30 15:11:12 2013 +0200
> # Branch stable
> # Node ID b44d4877db10ed093e06edc20ee81eb2cb95351f
> # Parent  f01a351db79106ba96ac6d527cf69944fd98e665
> hgweb: fix empty navigation detection
> 
> For some obscure reason, changelog.node(0) returns nullid if changelog is empty.

The reason is we stick the nullid changeset at index[tip+1]. This lets
us index it with index[-1], which lets us avoid an "if nullrev" in a
bunch of fastpath functions.

These are queued for stable, thanks.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list