The P4Source periodically polls a Perforce depot for changes. It accepts the following arguments:
     
p4base’p4port’p4user’p4passwd’p4bin’split_file’p4base, to a
(branch, filename) tuple. The default just returns (None, branchfile),
which effectively disables branch support. You should supply a function
which understands your repository structure.
     pollinterval’histmax’This configuration uses the P4PORT, P4USER, and P4PASSWD
specified in the buildmaster's environment. It watches a project in which the
branch name is simply the next path component, and the file is all path
components after.
     from buildbot.changes import p4poller
     s = p4poller.P4Source(p4base='//depot/project/',
                           split_file=lambda branchfile: branchfile.split('/',1),
                          )
     c['change_source'] = s