Rockbox.org home
release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Rockbox mail archive

Subject: Version Strings

Version Strings

From: Alex Bennee <kernel-hacker_at_bennee.com>
Date: Mon, 12 Jan 2009 16:36:42 +0000

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:

http://www.rockbox.org/tracker/task/9758

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:

rNNNN-date

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.

Cheers,

-- 
Alex, homepage: http://www.bennee.com/~alex/
CV: http://www.bennee.com/~alex/cv.php
Received on 2009-01-12

Page was last modified "Jan 10 2012" The Rockbox Crew
aaa