[PATCH STABLE] hgweb: add a `web.view` to control filtering

Pierre-Yves David pierre-yves.david at ens-lyon.org
Thu Jan 31 13:45:51 CST 2013


On 31 janv. 2013, at 20:26, Angel Ezquerra wrote:

> 
> On Jan 31, 2013 7:57 PM, <pierre-yves.david at logilab.fr> wrote:
> >
> > # HG changeset patch
> > # User Pierre-Yves David <pierre-yves.david at logilab.fr>
> > # Date 1359658615 -3600
> > # Branch stable
> > # Node ID 4a841ef7813f99bc7f091110e2f0dc8db82dfb86
> > # Parent  2a1fac3650a5b4d650198604c82ab59969500374
> > hgweb: add a `web.view` to control filtering
> >
> > This options add a new `web.view` to control filter level of hgweb.
> >
> > This option have two purposes:
> >
> > 1) Allow fall back to unfiltered version in case a yet undetected by critical
> >    bug is found in filtering after 2.5 release
> >
> > 2) People use hgweb as a local repoviewer. When they have secret changesets,
> >    they wants to use "visible" filter not "served"
> >
> > diff --git a/mercurial/help/config.txt b/mercurial/help/config.txt
> > --- a/mercurial/help/config.txt
> > +++ b/mercurial/help/config.txt
> > @@ -1457,5 +1457,11 @@ The full set of options is:
> >  ``style``
> >      Which template map style to use.
> >
> >  ``templates``
> >      Where to find the HTML templates. Default is install path.
> > +
> > +``view``
> > +    Controls Changesets filter to hgweb. Possible values are ``served``,
> > +    ``visible`` and ``all``. Default is ``served``. The ``served`` filter only
> > +    shows changesets that can be pulled from the hgweb instance. The``visible``
> > +    filter includes secret changesets but still excludes "hidden" one.
> 
> To my non native English speaker ears "served" seemed at first to imply revisions that _have been_ served, rather than they _can be_ served. This confused me at first since I thought this mode would not show revisions that have been pushed to the server. This is nonsense of course but perhaps another word could be used instead? Perhaps "accessible" or something similar?

For my part I read "served" as "being served". As "served" is the internal name of the filter used everywhere in the code, this is unlikely to changes.

> Also, if as you say users use hgweb as a way to view the history graphically, wouldn't it be necessary to also add a way to switch modes right from the hgweb interface (this option would set the default view)? (And to be done after the freeze).

Having a way to control the mode in the interface is something that'll probably want at some point. But this is a very low priority feature for me.

-- 
Pierre-Yves


More information about the Mercurial-devel mailing list