It would be useful to be able to retrieve the revision returned by computeSourceRevision in a source checkout step without a specified revision. The following tiny patch simply sets the "revision" property appropriately.
The motivation here is that I am using Perforce, which does not properly support the "got_revision" property. It would obviously be preferable to fix the Perforce support to support got_revision, but I have been unable to determine a proper way to do that. I believe that this alternate solution is generally useful, though.
--- /root/backup/source.py 2007-09-19 10:29:12.000000000 -0600
+++ source.py 2007-09-19 10:43:41.000000000 -0600
@@ -165,6 +165,7 @@
revision = s.revision
if not revision and not self.alwaysUseLatest:
revision = self.computeSourceRevision(s.changes)
+ self.setProperty("revision", revision)
# if patch is None, then do not patch the tree after checkout
# 'patch' is None or a tuple of (patchlevel, diff)