Hook ordering - behaviour change.

Matt Mackall mpm at selenic.com
Tue Aug 3 11:27:28 CDT 2010


On Tue, 2010-08-03 at 09:01 +0200, Dirkjan Ochtman wrote:
> On Tue, Aug 3, 2010 at 08:33, Aravind Gottipati <aravind at freeshell.org> wrote:
> > This is not so convenient for us because we list hooks
> > in multiple files, and we used to depend on the specific ordering of
> > hooks in the old scheme (alpha-numeric).
> 
> Yeah, this is kind of a problem in the new scheme. I think we have
> enough information in the configparser to do a hybrid scheme where we
> sort by original order per-file but sort by name inter-file, but I'm
> not sure that it would be better, in the following worst-case example:
> 
> /etc/mercurial/hgrc:
> 
> [hooks]
> changegroup.a = blah
> 
> and ~/.hgrc:
> 
> [hooks]
> changegroup.c = foo
> changegroup.b = bar
> 
> In the hybrid scheme, the order would be a, c, b. In any case, this is
> a real regression for Mozilla, so we should probably either revert to
> name-order or do some kind of hybrid scheme.

I'm afraid it's way too late to revert. That's been in the tree since
1.3 which means other people are now dependent on the current behavior.

Unfortunately, a new hybrid scheme would almost certainly cause
regressions for people who are doing something similarly elaborate with
the current scheme.

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list