[mythtv] SVN version info
Allan Stirling
Dibblahmythml0015 at pendor.org
Tue Nov 29 14:54:15 EST 2005
Currently, there is no global SVN version number available. This means that it
can be quite difficult for someone running SVN to be able to discover the
version number he is actually running.
I've been thinking about how to get this functionality into the final
executables and given the current version of SVN, there are a number of
possibilities:
1. Do without. If someone is compiling for SVN, they should KNOW what revision
they are running. This is the current state - The only version information
kept is the ABI version and the release.
2. Checkin scripts. These would be run from the client side on a checkin.
Error prone and increases dev overhead. This is the recommended method by the
SVN devs, from what I can see.
3. Autogenerate a version singleton as part of the configure script.
I'm thinking about how to implement 3:
Add a header to each of the text files in Myth, with the $revision$ and/or
$id$ svn keywords. These are automatically filled in by the SVN server on each
checkout. For an example, look at mythtv/libs/libmythsoundtouch/SoundTouch.cpp
(yes, evaluation of keywords appears to be enabled on at least some of the SVN
tree)
During configure (or build), scan a specific place in all source files (head
-nx) for the highest $revision$ tag. Once you've scanned all files, grab the
associated date from $id$, then create locally in the build tree a .h/.cpp
with a singleton version function.
Problems:
1. Requires an extra step for external resyncs (strip out the generated
headers / merge / readd headers).
2. Increases build / configure time.
So, what's the general concensus? Is this something worthwhile?
Have I missed something obvious?
Cheers,
Allan.
More information about the mythtv-dev
mailing list