[PATCH 2 of 2 V2] server: introduce a 'experimental.single-head-per-branch' option

Augie Fackler raf at durin42.com
Thu Nov 30 16:15:26 EST 2017


On Tue, Nov 21, 2017 at 08:13:57PM +0100, Boris Feld wrote:
> On Mon, 2017-11-20 at 16:14 -0500, Augie Fackler wrote:
> > On Mon, Nov 20, 2017 at 06:15:22PM +0100, Boris Feld wrote:
> > > # HG changeset patch
> > > # User Boris Feld <boris.feld at octobus.net>
> > > # Date 1510800762 -3600
> > > #      Thu Nov 16 03:52:42 2017 +0100
> > > # Node ID 2d706154205c1fbff7ad5baea90697c7848ad61c
> > > # Parent  5312b5738172718b868c1ecfd28ada8d4d7e85de
> > > # EXP-Topic single-heads
> > > # Available At https://bitbucket.org/octobus/mercurial-devel/
> > > #              hg pull https://bitbucket.org/octobus/mercurial-deve
> > > l/ -r 2d706154205c
> > > server: introduce a 'experimental.single-head-per-branch' option
> >
> > Convince me this should be done like this rather than as an example
> > hook? We've wanted example hooks in contrib/example-hooks for years,
> > maybe this would be a good start.
>
> We discussed the possibility to use a hook with Gregory, but found
> several limitations which explains why we went with this approach
> instead:
>
>     - The performance impact. Having the code in Python meant it has
> access to more data in a more efficient way.
>     - We don't really want to promote the Python hook API much because
> it uses the internal API.
>     - No cross-compatibility issues like we could have with shell
> scripts on Windows. And not all Mercurial installations on Windows have
> access to a Python interpreter.
>     - Named branch policy might really fit as standard hooks. However,
> we can think of multiple "mode" that would not really fit well as
> "hooks (see later in the email for details).
>
> Gregory seemed ready to take this series except for UI considerations,
> so we updated the series to put the config in experimental so we could
> land it while we bikeshed about how to activate it and what is the best
> form it should take.

Works for me. Since it's experimental, we can always drop it.

I'd still _very much_ like to see some sample hooks, and "only one
head in the repo" seems like a great starter hook for a
contrib/example-hooks/... collection. Might be a good way to earn some
brownie points.


More information about the Mercurial-devel mailing list