buildbot/buildbot — pull request #396 by jaredgrubb (2012-05-05 18:37:22+00:00)
Title: Fixes #2180: Allow for "git describe" in addition to got_revision

This patch provides a mechanism to invoke "git describe" after checkout. This will set the property 'commit-description' (or 'commit-description-foo' if the source's codebase is 'foo') with the result.

This can be invoked in various ways, which control the arguments to git-describe:

Git(...) # default is no git describe
Git(..., getDescription=True) # invokes "git describe"
Git(..., getDescription=dict(abbrev=10)) # invokes "git describe --abbrev=10"
Git(..., getDescription=dict(tags=True, abbrev=0)) # invokes "git describe --abbrev=10 --tags"

and so forth for the various possible arguments for "git describe". The basic rule I used is that you can pass in a dictionary with the name of the argument as the key and the value being the argument's parameter (or just "True" if the arg doesnt have a param). Passing None or False suppresses that argument.

I havent written the docs yet for this patch; if you like the approach I can prepare the docs.