Reg : Keyword expansion
Kastner Masilko, Friedrich
Kastner-Masilko at at.festo.com
Sun Aug 29 20:59:45 UTC 2010
From: mercurial-bounces at selenic.com [mailto:mercurial-bounces at selenic.com] On Behalf Of Alexander
> At the repo level you can (must) use hg parents --template "..." >
> filename (file must be excluded from versioning)
>
> You can build such file with current hg commands, AFAIK, and use it
There are some problems with your idea for our use-case:
1. Someone has to issue this command-line. Of course you can put it into a hook, but that is already an entry in the hgrc, so why not go further and activate an extension.
2. The file can't be created as a simple single line of content. It contains more than just said custom variables and there is no include-mechanism in the designer system. So you'd have to patch a very specific line in an already existing file.
3. The file needs to be versioned because it contains important content for the project.
4. Simply overwriting a versioned file in the working copy will mess up status output, diffs etc.
Please note that I'm aware of keyword-expansion opening a can of worms if used in cases where they are simply not needed. But you have to accept the fact that there are systems in use that are not using a C pre-processor with a "#include" statement and a well-behaving make process. If you want (need) to put keyword expansion into such projects, you are pretty much left alone by Mercurial. This is especially bad if you try to convince a team of developers of the advantages of DVCS in general and specifically Mercurial, and the first thing you stumble upon in a new project is answered with "oh, you can't do it with DVCS, it is not needed anyway", when the old system did it perfectly well (SVN) and there is no replacement for it.
Fortunately this DVCS is written in a scripting language, so extending it was a matter of minutes without shell-fu or platform headaches ;) . It was easier this time, because I already learned Python from the earlier need to extend Mercurial in order to get proper timestamping for another "exotic" development system...
regards,
Fritz
Development Software Systems
Festo Gesellschaft m.b.H.
Linzer Strasse 227
Austria - 1140 Wien
Firmenbuch Wien
FN 38435y
Tel: +43(1)91075-198
Fax: +43(1)91075-282
www.festo.at
Der Inhalt dieses E-Mails ist ausschliesslich fuer den bezeichneten Adressaten bestimmt. Jede Form der Kenntnisnahme,
Veroeffentlichung, Vervielfaeltigung oder Weitergabe des Inhalts dieses E-Mails durch unberechtigte Dritte ist unzulaessig. Wir
bitten Sie, sich mit dem Absender des E-Mails in Verbindung zu setzen, falls Sie nicht der Adressat dieses E-Mails sind und das
Material von Ihrem Computer zu loeschen.
This e-mail and any attachments are confidential and intended solely for the addressee. The perusal, publication, copying or
dissemination of the contents of this e-mail by unauthorised third parties is prohibited. If you are not the intended recipient of this
e-mail, please delete it and immediately notify the sender.
More information about the Mercurial
mailing list