Opened 12 years ago

Closed 11 years ago

#229 closed defect (fixed)

Build properties "revision" and "got_revision" not populated for P4

Reported by: tonnis Owned by:
Priority: major Milestone: undecided
Version: 0.7.7 Keywords: P4 BuildProperties revision got_revision
Cc:

Description

It seems that the Build properties "revision" and "got_revision" are not populated for P4 (Perforce). I am not super Python, nor buildbot literate, but I cannot find where the "revision" property is populated onto the build instance by SourceBase? or *any* of its descendant classes, and it is not being populated when I use ...WithProperties?("%(revision)s") for ShellCommands? executed after the P4 Step. (The missing "got_revision" is also mentioned in Bug #127)

Attachments (1)

commands.py-diff (3.5 KB) - added by tonnis 12 years ago.
Patch (diff) for buildbot/slave/commands.py

Download all attachments as: .zip

Change History (4)

Changed 12 years ago by tonnis

Patch (diff) for buildbot/slave/commands.py

comment:1 Changed 12 years ago by tonnis

Here is a patch that does the right thing for got_revision. It follows the pattern used in the Subversion adapter by making a subsequent ShellCommand? via the callback used by parseGotRevision. This output of the command is parsed to get the revision (Change List) number.

'This patch applies to the 0.7.7 version sources. The drop down on this Ticket does not list 0.7.7 as an option.'

comment:2 Changed 12 years ago by warner

  • Version changed from 0.7.6 to 0.7.7

seems reasonable. what sort of test coverage could we manage on this? let's take a look at test_vc.py and see if it does any sorts of checks on got_revision.

comment:3 Changed 11 years ago by dustin

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.