Hi,
I have implemented such a feature in a C++ program of mine. In my specific 
case, I have a build script (in Windows and Linux versions) that is run by 
Eclipse in the pre-build phase. The script creates a app_version.h file 
that is a header file included in standard C++ files. The app version 
header contains two defines, for instance:

#define APP_REVISION "585"
#define APP_TAG "4.1"

This is later used in the program at run time, specifically to in the name 
of files created by the program, which allows me to keep track of different 
output files created by different versions of the program.

The app revision define is obtained with: hg parents --template {rev}
The app tag define is obtained with: hg parents --template {latesttag}

HTH.

On Tuesday, October 13, 2015 at 6:34:56 PM UTC+2, [email protected] wrote:
>
> Would it be possible with MercurialEclipse to have a variable alike __DATE__ 
> or __TIME__ that will represent at compile time a string with the 
> contents of the node ID or even more node data.
> The practical usage would be that a source code file (e.g. node.c) will 
> not change in edited soure code, but after build and program, in 
> the debugger one can read the variable and knows what node there was 
> present with the last build/download.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"MercurialEclipse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to