Rockbox

Tasklist

FS#10414 - tools/version.sh support for bzr or bzr-svn repositories

Attached to Project: Rockbox
Opened by Torne Wuff (torne) - Wednesday, 08 July 2009, 19:45 GMT
Last edited by Torne Wuff (torne) - Thursday, 15 October 2009, 12:43 GMT
Task Type Patches
Category Build environment
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Version 3.3
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

tools/version.sh has some support for displaying the revision number for git-svn repositories, and their dirty status.

Attached patch adds similar support for bzr and bzr-svn. It uses the presence of a .bzr directory to detect bzr branches which should be fairly unambiguous. :)

1) A bzr-svn checkout of r12345 will output "r12345-date" or "r12345M-date" if there are uncommitted changes. This should make it behave identically to svn if bzr is being used as a direct replacement.

2) A bzr branch which has merged svn changes up to r12345 but is itself at bzr revision 13579 will output "r12345+bzr13579" or "r12345+bzr13579M" if there are uncommitted changes. This lets a developer using bzr keep track of what svn revision their branch is based from, but also shows them what revision of their own bzr-committed work they are at.

3) A bzr branch with no svn changes in its ancestry at revision 13579 will output "bzr13579" or "bzr13579M" if there are uncommitted changes. This may be useful if tailor or other VCS-converting schemes are in use instead of bzr-svn - the version number is meaningless to the rest of the world but at least means something to the person who made the build.

There should be no impact on anyone who doesn't have a .bzr directory in their copy of rockbox :)
This task depends upon

Closed by  Torne Wuff (torne)
Thursday, 15 October 2009, 12:43 GMT
Reason for closing:  Fixed
Additional comments about closing:  Submitted in r23187
Comment by Torne Wuff (torne) - Wednesday, 08 July 2009, 19:46 GMT
Whoops, managed to upload an empty diff.
Comment by Torne Wuff (torne) - Wednesday, 08 July 2009, 19:49 GMT
...aaaand accidentally changed a line of the git support.

I assure everyone that this is just me making foolish mistakes and not any shortcoming of bzr :)
Comment by Alex Bennee (ajb) - Thursday, 09 July 2009, 09:03 GMT
Looks OK to me.

I know some people complained about me adding a git commit -ish id when I added the git stuff which is why it only indicates the nearest svn version and the M for modified.
Comment by Torne Wuff (torne) - Thursday, 09 July 2009, 09:25 GMT
My build comes from a loom of 12-15 branches stacked on top of each other so without the bzr revision I have no chance in hell of keeping track what's on my ipod at any given time :) Bzr revisions are at least short (but not global).

Loading...