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

Class Mercurial

source code

process.properties.PropertiesMixin --+            
                                     |            
           process.buildstep.BuildStep --+        
                                         |        
        process.buildstep.LoggingBuildStep --+    
                                             |    
                              oldsource.Source --+
                                                 |
                                                Mercurial

Class for Mercurial with all the smarts

Instance Methods
 
__init__(self, repourl=None, mode='incremental', method=None, defaultBranch=None, branchType='dirname', clobberOnBranchChange=True, **kwargs) source code
 
startVC(self, branch, revision, patch) source code
 
full(*args, **kwargs) source code
 
incremental(self) source code
 
clean(self, _) source code
 
clobber(self, _) source code
 
fresh(self, _) source code
 
finish(self, res) source code
 
parseGotRevision(self, _) source code
 
computeSourceRevision(self, changes)
Each subclass must implement this method to do something more precise than -rHEAD every time.
source code
 
checkHg(self) source code

Inherited from oldsource.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, setBuild, setBuildSlave, setProgress, setupProgress, slaveVersion, slaveVersionIsOlderThan, startStep

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

Class Variables
  name = 'hg'
  renderables = ['repourl']
  possible_modes = ('incremental', 'full')
  possible_methods = (None, 'clean', 'fresh', 'clobber')
  possible_branchTypes = ('inrepo', 'dirname')

Inherited from oldsource.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, repourl=None, mode='incremental', method=None, defaultBranch=None, branchType='dirname', clobberOnBranchChange=True, **kwargs)
(Constructor)

source code 
Parameters:
  • repourl (string) - the URL which points at the Mercurial repository. if 'dirname' branches are enabled, this is the base URL to which a branch name will be appended. It should probably end in a slash.
  • defaultBranch - if branches are enabled, this is the branch to use if the Build does not specify one explicitly. For 'dirname' branches, It will simply be appended to repourl and the result handed to the 'hg update' command. For 'inrepo' branches, this specifies the named revision to which the tree will update after a clone.
  • branchType - either 'dirname' or 'inrepo' depending on whether the branch name should be appended to the repourl or the branch is a mercurial named branch and can be found within the repourl
  • clobberOnBranchChange - boolean, defaults to True. If set and using inrepos branches, clobber the tree at each branch change. Otherwise, just update to the branch.
Overrides: process.buildstep.BuildStep.__init__

full(*args, **kwargs)

source code 
Decorators:
  • @defer.deferredGenerator

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