[PATCH] annotate: introduce file extension specific annotate options
Mads Kiilerich
mads at kiilerich.com
Wed Jun 20 15:53:07 CDT 2012
Angel Ezquerra wrote, On 06/19/2012 11:02 PM:
> # HG changeset patch
> # User Angel Ezquerra <angel.ezquerra at gmail.com>
> # Date 1340139680 -7200
> # Node ID bc99abe9b3796d363c1952e3255428f18af91568
> # Parent 132ea1736751cb02b16992cf421e7de8bad888a1
> annotate: introduce file extension specific annotate options
This patch needs some documentation (in hgrc and annotate help, I guess)
and some tests before it is ready for submission.
> For consistency a similar change should also be applied to the diff command and
> the record extension.
'defaults' has been deprecated. 'diff' and 'annotate' default settings
has for some reason not been deprecated - perhaps they should. This
patch goes in the opposite direction and might give even more surprising
behaviour for standard commands. I am not sure that is a good idea.
We already have 'extdiff' which makes it easy to define custom diff
commands using an external diff tool. It can't make it file extension
specific, but they would come pretty close in functionality. The primary
lesson I take from that is that it might be fine to have such
functionality in an extension instead of as core functionality.
Besides that: We already have extension specific configuration in
'merge-patterns' ... especially in combination with 'merge-tools'. (IIRC
TortoiseHg overload the merge-patterns / merge-tools configuration for
some extdiff-like functionality.) It is unfortunate to introduce a
completely different pattern matching configuration method for a similar
problem. It is possible that they could be generalized to some common
'patterns' and 'tools' configuration settings that perhaps could be used
together with 'alias' to create convenient custom commands.
My conclusion is that it would be better to let this functionality start
out as an out-of-tree extension.
/Mads
More information about the Mercurial-devel
mailing list