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

Class P4

source code

process.properties.PropertiesMixin --+            
                                     |            
           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, describe, getRepository, setDefaultWorkdir, setStepStatus, start

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

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

Inherited from process.properties.PropertiesMixin: __providedBy__, getProperties, getProperty, hasProperty, has_key, render, setProperty

Class Variables
  name = 'p4'
  renderables = ['p4base']

Inherited from Source: branch, description, descriptionDone, flunkOnFailure, haltOnFailure, notReally

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

Inherited from process.buildstep.BuildStep: __implemented__, alwaysRun, build, doStepIf, flunkOnWarnings, hideStepIf, locks, progress, set_runtime_properties, step_status, useProgress, warnOnFailure, warnOnWarnings

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)