Rockbox

Tasklist

FS#11880 - Include git commit ID in version string

Attached to Project: Rockbox
Opened by sideral (sideral) - Sunday, 16 January 2011, 01:39 GMT
Last edited by sideral (sideral) - Friday, 06 May 2011, 08:46 GMT
Task Type Patches
Category Build environment
Status Closed
Assigned To sideral (sideral)
Operating System All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Better version reporting for git-tracked repositories: Include the git commit ID in the version string, much like is done for repos tracked with bzr.
This task depends upon

Closed by  sideral (sideral)
Friday, 06 May 2011, 08:46 GMT
Reason for closing:  Accepted
Additional comments about closing:  Committed as r29827
Comment by sideral (sideral) - Friday, 04 February 2011, 14:14 GMT
As the question has come up on IRC:

The version strings generated for builds in git-managed source trees would look like this:

* “r12345-110204” when building a revision committed upstream
* “r12345M-110204” when building a revision committed upstream with local, uncommitted changes (this and the previous strings match the existing behavior)
* “r12345+1a2b3c-110204” when building a locally committed revision based on SVN r12345 (the hex number after the “+” is the abbreviated git commit ID)
* “r12345+1a2b3cM-110204” when building a locally committed revision based on SVN r12345 with local, uncommitted changes.

Only developers who have local commits would ever see the git commit ID. Thus, I don't think the length of the version string presents any usability problem despite the possible truncation of the version display when booting on a device with a very small screen. In my experience, the benefit for the developer when having to answer the question “which build am I running” much outweighs this minor nuisance.

However, if people see this as a major problem, we could abbreviate the commit ID even more, to (say) 3 characters. Given that local branches likely won't divert too far off the SVN revision reported in the version number, few characters are needed to uniquely identify the commit that was actually built.

Loading...