Ticket #101 (assigned enhancement)

Opened 1 year ago

Last modified 7 months ago

Set "revision" property when using computeSourceRevision

Reported by: kvigor Assigned to: warner (accepted)
Priority: minor Milestone: 0.8.0
Component: other Version: 0.7.5
Keywords: Cc:

Description

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)

Change History

04/28/08 14:46:43 changed by warner

  • owner set to warner.
  • status changed from new to assigned.
  • milestone changed from undecided to 0.7.8.

seems reasonable