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

Class P4

source code

                            object --+                
                                     |                
process.properties.PropertiesMixin --+                
                                     |                
           process.buildstep.BuildStep --+            
                                         |            
        process.buildstep.LoggingBuildStep --+        
                                             |        
                                   base.Source --+    
                                                 |    
                                       SlaveSource --+
                                                     |
                                                    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)
x.__init__(...) initializes x; see help(type(x)) for signature
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 SlaveSource: commandComplete, start

Inherited from base.Source: describe, setDefaultWorkdir, setStepStatus, updateSourceProperty

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, releaseLocks, runCommand, setBuildSlave, setProgress, setupProgress, slaveVersion, slaveVersionIsOlderThan, startStep

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

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

Static Methods

Inherited from process.buildstep.BuildStep: __new__

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

Inherited from base.Source: branch, description, descriptionDone, descriptionSuffix, 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

Properties

Inherited from object: __class__

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 

x.__init__(...) initializes x; see help(type(x)) for signature

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: object.__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: base.Source.computeSourceRevision
(inherited documentation)