[PATCH RFC] hgweb: replace some linkrev() with introrev() in hope issue4506 goes away

Matt Harbison mharbison72 at gmail.com
Mon Feb 16 19:35:36 CST 2015


On Mon, 16 Feb 2015 03:18:04 -0500, Anton Shestakov <engored at ya.ru> wrote:

> # HG changeset patch
> # User Anton Shestakov <engored at ya.ru>
> # Date 1424074464 -28800
> #      Mon Feb 16 16:14:24 2015 +0800
> # Node ID 43dee1e7b5a6726697cc5cbdc20f77852ff10f0a
> # Parent  0cfff4c42c9a146a09877cefee5a839cd70c6a2f
> hgweb: replace some linkrev() with introrev() in hope issue4506 goes away
>
> The issue is titled "filtered revision 'XXX' (not in 'served' subset)"  
> and that
> is the error message you sometimes get when trying to look at a file  
> (/file or
> /annotate) in hgweb. For example:
>
> http://hg.intevation.org/mercurial/crew/file/90cf454edd70/mercurial/cmdutil.py
>
> There's a test case in the issue, it involves rebase + evolve.
>
> Looks like replacing ctx.linkrev() with ctx.introrev() fixes the problem  
> (as
> marmoute expected in one of the comments). There were no tests for  
> something
> like this, since they would probably require evolve extension. Which  
> worries me
> a bit, since on the other hand, this patch could break something that  
> also
> doesn't have tests. I'd like to tell more about the patch, but since I  
> know
> nothing about linkrev bugs, I'd rather listen.

I know nothing about linkrev bugs either, but you should be able to  
formulate the test using 'debugobsolete' without using evolve.  See  
test-obsolete.t for how to get the full 40 character id for the command,  
based on the commit comment.  (Be careful though- I spent a lot of time  
debugging cryptic errors that turned out to be debugging notes coming out  
before the hash, because getid() uses the --debug flag.  It probably would  
be better to use 'log -T "{node}\n"' or something similar.)

--Matt


More information about the Mercurial-devel mailing list