Hook ordering - behaviour change.

Dirkjan Ochtman dirkjan at ochtman.nl
Wed Aug 4 02:00:10 CDT 2010


On Wed, Aug 4, 2010 at 00:14, Aravind Gottipati <aravind at freeshell.org> wrote:
> This patch should do that.  To be consistent with the rest of the
> variable names, I changed the variable name to "sorthooks".  Setting
> sorthooks = True, will make Mercurial sort the hooks before applying
> them.  Setting it to False or omitting it defaults to the current
> behavior.  I have tested this against 1.5.4 (and it should work
> against tip as well).

Hmm, I think I'd still prefer it to be called just "sort", "sorthooks"
feels verbose in the context of a "hooks" section. Also, maybe we
should have it take a value instead of boolean, to disambiguate?
Sorting by order of appearance in the hgrc file is still sorting, in a
sense. sort = name seems clearer (or sortby?).

Would you be in a position to add a test for it as well? The test
format is pretty simple (see the tests dir, just add to a test-* file
that deals with hooks) and it will ensure we don't regress this.

Cheers,

Dirkjan


More information about the Mercurial-devel mailing list