# HG changeset patch # User Pierre-Yves David # Date 1346356029 -7200 # Node ID 9555231a66b245b37157ea9de10d94967e28a64a # Parent 63fd2a62cec4dd1b5f70f45377509a9d846a88b7 hgweb: disable branchtip filtering for hgweb hgweb make extensibe use of branchtip we should. - Our branchtip wrapping make the function expensive, killing performance. - We do not filter anything un hgweb yet. diff -r 63fd2a62cec4 -r 9555231a66b2 hgext/evolve.py --- a/hgext/evolve.py Thu Aug 30 20:28:00 2012 +0200 +++ b/hgext/evolve.py Thu Aug 30 21:47:09 2012 +0200 @@ -49,6 +49,8 @@ from mercurial.commands import walkopts, commitopts, commitopts2 from mercurial.node import nullid +import mercurial.hgweb.hgweb_mod + # This extension contains the following code @@ -579,6 +581,8 @@ @eh.wrapfunction(localrepo.localrepository, 'branchtip') def obsbranchtip(orig, repo, branch): """ensure "stable" reference does not end on a hidden changeset""" + if not getattr(repo, '_dofilterbranchtip', True): + return orig(repo, branch) result = () heads = repo.branchmap().get(branch, ()) if heads: @@ -588,6 +592,13 @@ return result[0].node() +@eh.wrapfunction(mercurial.hgweb.hgweb_mod.hgweb, '__init__') +@eh.wrapfunction(mercurial.hgweb.hgweb_mod.hgweb, 'refresh') +def nofilter(orig, hgweb, *args, **kwargs): + orig(hgweb, *args, **kwargs) + hgweb.repo._dofilterbranchtip = False + + ##################################################################### ### Additional Utilities ### #####################################################################