C++ include file with revision id

John Arbash Meinel john at arbash-meinel.com
Tue Aug 26 21:41:20 BST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

guerinp at magic.fr wrote:
> Hello All,
> 
> After modifying C++ source files and commited them, I want to produce a
> file containing the revison id, as in the User's reference doc example,
> that will be available for the compilation and production process.
> 1/ I need that the revid file be available for export, so I suppose that
> it should be versionned.
> 2/ Is it possible to produce such a file just before the commit but once
> the new revid is known.
> 
> It seems to be like Circle's quadrature and cannot be achived without
> the help of external tools
> 
> Kind regards

This is generally not something you would want to version, as it would change
with every commit, and cause conflicts when merging, etc.

In general, I would use:

bzr version-info --custom --template="...." > version.cpp

See "bzr help version-info" for more information on how to define a template.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFItGpwJdeBCYSNAAMRAln6AJ9zfj2CE6sNoV/8+wE0SooReMwpyACgxZWu
bACWVDWEFDYqax2eeiTpa3k=
=1xQo
-----END PGP SIGNATURE-----



More information about the bazaar mailing list