Keywords-Extension
Christian Ebert
blacktrash at gmx.net
Wed Jan 30 05:58:20 CST 2008
* Marcin Kasperski on Tuesday, January 29, 2008 at 10:18:39 +0100
>>> 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.
>
> Over many machines?????
;-) This should be doable by versioned mapfiles ... in the
(hopefully) near future. atm I'm restructuring the extension to
avoid ugly double and error prone command line parsing.
>> But you probably meant [keyword] filename patterns,
>
> Yes, this is more important.
>
>> 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.
>
> Well, I have the feeling that core mercurial could provide some
> support for versioned repository configuration parts (call it
> metadata, or whatever). When I recently raised this, giving
> keywords maps as an example, somebody claimed that extension can
> easily implement support for versioned maps and such feature
> is not needed ;-)
I only have a vague memory, if we are speaking of the same rather
convoluted thread. As stated above it should be rather easy to
add support for *template* mapping files, but filename patterns
are an entirely different cup of tea.
And even if Mercurial would support this kind of metadata, the
problem of unexpanding before removing files from the expansion
candidate list remains; and, as you mention below, one tends to
forget ... and, contrary to a forgotten manual config change,
this would change history. An automatic procedure would require
to detect changes in keyword config /before/ updating (and then
even more files to check), and then run an equivalent of "hg
kwshrink" (best only on concerned files) ... at least atm I don't
see me doing this. There's already another problem if you have
'[keyword]\n**=' in a global hgrc and work with mq ...
>> From a practical point of view, I don't think you change your per
>> repo [keyword] filename patterns every day,
>
> No, I do it very rarely. The problem is somewhere else - I fairly
> frequently spawn new clones (both local and remote)
>
> And this is of course not much work to copy those settings, the main
> problem is that I repeatably forget to do it ;-)
You can catchup with kwexpand after you remembered ;-)
> (in fact even if there were some warning about lacking keyword maps
> issued on clone or update, it would be useful)
On update? They might be lacking on purpose.
On clone, I'll think about it.
c
--
ich bin eine Null eine Null is eine runde Sache
--> <http://www.blacktrash.org/hanullmann/hanullmann.html>
More information about the Mercurial
mailing list