Ticket #101 (assigned enhancement)

Opened 22 months ago

Last modified 5 months ago

Set "revision" property when using computeSourceRevision

Reported by: kvigor Owned by: warner
Priority: minor Milestone: 0.7.+
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

Changed 14 months ago by warner

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

seems reasonable

Changed 5 months ago by dustin

  • milestone changed from 0.8.0 to 0.7.+

Changed 5 months ago by dustin

I'd like to only set this property in the P4 step - it should already be correct for the other supported VCs

Note: See TracTickets for help on using tickets.