Rockbox mail archive
Subject: Version Strings
With more people using the pure GIT repository for development
(including me) I ran into a problem with the current svnversion script
stalling on non-git-svn repos.
The resultant patch can be seen at:
It's been through a couple of revisions as people have discussed the
best way of keeping information about the revision. The patch as is
now will do the following:
If it's a SVN repo echo:
where NNNN is the subversion version.
If it detects a GIT repo it starts the version string with 'g' to
indicate it's been built from git. If the current HEAD of the git repo
is a git-svn commit it then echos "rNNNNN" to show that although built
from a git repo it should match the equivalent subversion revision.
If the HEAD isn't a git-svn commit then it echos the short git
commit-ish which uniquely identifies the version (and history) of that
branch. It will also echo '(~rNNNNN)' which is the closest subversion
revision the build corresponds to. This is useful if people want to
see if a bug has been fixed since but at the same time the git
commit-ish is the more useful piece of information as the build may
have been quite hacked up since then.
Finally it outputs '-dirty' if the tree contains uncommitted changes.
I'd appreciate it if anyone with a view on such things could have a
look and comment if there is something they don't like. Otherwise I
would be very grateful if someone could merge this change into SVN.
Alex, homepage: http://www.bennee.com/~alex/
Received on 2009-01-12
Page was last modified "Jan 10 2012" The Rockbox Crew