--- /dev/null
+class CmdRevision(object):
+ def __init__(self):
+ self.name = 'revision'
+ self.help = 'print the head git revision number'
+
+ def run(self, args):
+ target = SourceTarget()
+ tree = globals.trees.get(args.project, args.checkout, target)
+ with TreeDirectory(tree):
+ print command_and_read('git rev-parse HEAD').readline().strip()[:7]
+ target.cleanup()