Package buildbot :: Package changes :: Module p4poller :: Class P4Source
[frames] | no frames]

Class P4Source

source code

twisted.application.service.Service --+    
                                      |    
               util.ComparableMixin --+    
                                      |    
                      base.ChangeSource --+
                                          |
                   util.ComparableMixin --+
                                          |
                                         P4Source

This source will poll a perforce repository for changes and submit them to the change master.

Instance Methods
 
__init__(self, p4port=None, p4user=None, p4passwd=None, p4base='//', p4bin='p4', split_file=<function <lambda> at 0x4e62398>, pollinterval=600, histmax=None) source code
 
startService(self) source code
 
stopService(self) source code
 
describe(self) source code
 
checkp4(self) source code

Inherited from twisted.application.service.Service: __getstate__, __providedBy__, disownServiceParent, privilegedStartService, setName, setServiceParent

Inherited from util.ComparableMixin: __cmp__, __hash__

Class Variables
  compare_attrs = ['p4port', 'p4user', 'p4passwd', 'p4base', 'p4...
  env_vars = ['P4CLIENT', 'P4PORT', 'P4PASSWD', 'P4USER', 'P4CHA...
  changes_line_re = re.compile(r'Change (?P<num>\d+) on \S+ by \...
  describe_header_re = re.compile(r'Change \d+ by (?P<who>\S+)@\...
  file_re = re.compile(r'^\.\.\. (?P<path>[^#]+)#\d+ [/\w]+$')
  datefmt = '%Y/%m/%d %H:%M:%S'
  parent = None
hash(x)
  last_change = None
hash(x)
  loop = None
hash(x)
  working = False

Inherited from base.ChangeSource: __implemented__, __provides__

Inherited from twisted.application.service.Service: name, running

Method Details

__init__(self, p4port=None, p4user=None, p4passwd=None, p4base='//', p4bin='p4', split_file=<function <lambda> at 0x4e62398>, pollinterval=600, histmax=None)
(Constructor)

source code 
Parameters:
  • p4port (string) - p4 port definition (host:portno)
  • p4user (string) - p4 user
  • p4passwd (string) - p4 passwd
  • p4base (string) - p4 file specification to limit a poll to without the trailing '...' (i.e., //)
  • p4bin (string) - path to p4 binary, defaults to just 'p4'
  • pollinterval (int) - interval in seconds between polls
  • histmax (int) - (obsolete) maximum number of changes to look back through. ignored; accepted for backwards compatibility.
  • split_file (func $param split_file: splits a filename into branch and filename.)

startService(self)

source code 
Overrides: twisted.application.service.Service.startService

stopService(self)

source code 
Overrides: twisted.application.service.Service.stopService

Class Variable Details

compare_attrs

Value:
['p4port', 'p4user', 'p4passwd', 'p4base', 'p4bin', 'pollinterval']

env_vars

Value:
['P4CLIENT', 'P4PORT', 'P4PASSWD', 'P4USER', 'P4CHARSET']

changes_line_re

Value:
re.compile(r'Change (?P<num>\d+) on \S+ by \S+@\S+ \'.*\'$')

describe_header_re

Value:
re.compile(r'Change \d+ by (?P<who>\S+)@\S+ on (?P<when>.+)$')