Package buildbot :: Package steps :: Module source :: Class P4
[frames] | no frames]

Class P4

source code

   process.buildstep.BuildStep --+        
                                 |        
process.buildstep.LoggingBuildStep --+    
                                     |    
                                Source --+
                                         |
                                        P4

P4 is a class for accessing perforce revision control

Instance Methods
 
__init__(self, p4base=None, defaultBranch=None, p4port=None, p4user=None, p4passwd=None, p4extra_views=[], p4line_end='local', p4client='buildbot_%(slave)s_%(builder)s', **kwargs) source code
 
setBuild(self, build) source code
 
computeSourceRevision(self, changes)
Each subclass must implement this method to do something more precise than -rHEAD every time.
source code
 
startVC(self, branch, revision, patch) source code

Inherited from Source: commandComplete, computeRepositoryURL, describe, setDefaultWorkdir, setStepStatus, start

Inherited from process.buildstep.LoggingBuildStep: addLogFile, checkDisconnect, createSummary, evaluateCommand, getText, getText2, interrupt, maybeGetText2, setStatus, setupLogfiles, startCommand

Inherited from process.buildstep.BuildStep: acquireLocks, addCompleteLog, addFactoryArguments, addHTMLLog, addLog, addLogObserver, addURL, failed, finished, getLog, getProperty, getSlaveName, getStepFactory, releaseLocks, runCommand, setBuildSlave, setProgress, setProperty, setupProgress, slaveVersion, slaveVersionIsOlderThan, startStep

Class Variables
  name = 'p4'

Inherited from Source: branch, flunkOnFailure, haltOnFailure, notReally

Inherited from process.buildstep.LoggingBuildStep: cmd, logfiles, parms, progressMetrics

Inherited from process.buildstep.BuildStep: alwaysRun, doStepIf, flunkOnWarnings, locks, useProgress, warnOnFailure, warnOnWarnings

Instance Variables

Inherited from process.buildstep.BuildStep: build, progress, step_status

Method Details

__init__(self, p4base=None, defaultBranch=None, p4port=None, p4user=None, p4passwd=None, p4extra_views=[], p4line_end='local', p4client='buildbot_%(slave)s_%(builder)s', **kwargs)
(Constructor)

source code 
Parameters:
  • p4base (string) - A view into a perforce depot, typically "//depot/proj/"
  • defaultBranch (string) - Identify a branch to build by default. Perforce is a view based branching system. So, the branch is normally the name after the base. For example, branch=1.0 is view=//depot/proj/1.0/... branch=1.1 is view=//depot/proj/1.1/...
  • p4port (string) - Specify the perforce server to connection in the format <host>:<port>. Example "perforce.example.com:1666"
  • p4user (string) - The perforce user to run the command as.
  • p4passwd (string) - The password for the perforce user.
  • p4extra_views (list of tuples) - Extra views to be added to the client that is being used.
  • p4line_end (string) - value of the LineEnd client specification property
  • p4client (string) - The perforce client to use for this buildslave.
Overrides: process.buildstep.BuildStep.__init__

setBuild(self, build)

source code 
Overrides: process.buildstep.BuildStep.setBuild

computeSourceRevision(self, changes)

source code 

Each subclass must implement this method to do something more precise than -rHEAD every time. For version control systems that use repository-wide change numbers (SVN, P4), this can simply take the maximum such number from all the changes involved in this build. For systems that do not (CVS), it needs to create a timestamp based upon the latest Change, the Build's treeStableTimer, and an optional self.checkoutDelay value.

Overrides: Source.computeSourceRevision
(inherited documentation)