Keywords-Extension
Christian Ebert
blacktrash at gmx.net
Mon Jan 28 16:19:07 CST 2008
* Marcin Kasperski on Monday, January 28, 2008 at 10:56:53 +0100
>> Still I would encourage to set [keyword] filename patterns on a
>> per repo basis, unless you really know what you are doing (I
>> usually don't ;) ).
>
> Any chances to configure keyword maps so they are automatically
> synchronized between repos?
In case you mean [keywordmaps] expansion mappings, you can use
global hgrc files.
But you probably meant [keyword] filename patterns, then the
short answer is no, at least not at the moment -- unless someone
else wants to implement it.
Longer answer: atm moment I don't see that this is possible with
a versioned file, syntax and trust issues aside. The
configuration of the target repo would be read in at reposetup
time, which means you'd still have the old keyword config.
So this would mean some external file at some random location --
perhaps possible if [keyword] pattern is a single and absolute
path, but:
There's danger ahead: if you decide that a file should not have
its keywords expanded, and do not unexpand (hg kwshrink) the
keyword in that file /before/ you change the configuration,
expanded keywords might easily get into the file's history, and
this should be avoided at all costs. This already is a trap as of
now, but looks even more problematic for an automatically
synchronized repo. Even if it were possible, it would mean to
detect changes in the keyword config /before/ repo
synchronization and possibly run the equivalent of "hg kwshrink"
before the actual transaction -- looks quite expensive.
More information about the Mercurial
mailing list