[Buildbot-commits] buildbot/docs buildbot.texinfo,1.53,1.54

Brian Warner warner at users.sourceforge.net
Mon Jun 12 08:36:10 UTC 2006


Update of /cvsroot/buildbot/buildbot/docs
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv16958/docs

Modified Files:
	buildbot.texinfo 
Log Message:
[project @ applied patch SF#1473939, initial Perforce support]

Original author: warner at lothar.com
Date: 2006-06-12 07:01:00

Index: buildbot.texinfo
===================================================================
RCS file: /cvsroot/buildbot/buildbot/docs/buildbot.texinfo,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -d -r1.53 -r1.54
--- buildbot.texinfo	29 May 2006 00:10:20 -0000	1.53
+++ buildbot.texinfo	12 Jun 2006 08:36:08 -0000	1.54
@@ -128,6 +128,7 @@
 * CVSToys - mail notification::  
 * Other mail notification ChangeSources::  
 * PBChangeSource::              
+* P4Source::                    
 
 Build Process
 
@@ -150,7 +151,7 @@
 * Mercurial::                   
 * Arch::                        
 * Bazaar::                      
-* P4Sync::                      
+* P4::                          
 
 Simple ShellCommand Subclasses
 
@@ -1165,6 +1166,13 @@
 @code{branch} are simply concatenated together to derive the
 @code{svnurl} to use for the checkout.
 
+ at uref{http://www.perforce.com/, Perforce} is similar. The server
+is specified through a @code{P4PORT} parameter. Module and branch
+are specified in a single depot path, and revisions are
+depot-wide. When branches are used, the @code{p4base} and
+ at code{defaultBranch} are concatenated together to produce the depot
+path.
+
 @uref{http://wiki.gnuarch.org/, Arch} and
 @uref{http://bazaar.canonical.com/, Bazaar} specify a repository by
 URL, as well as a @code{version} which is kind of like a branch name.
@@ -2302,6 +2310,7 @@
 * CVSToys - mail notification::  
 * Other mail notification ChangeSources::  
 * PBChangeSource::              
+* P4Source::                    
 @end menu
 
 @node Choosing ChangeSources, CVSToys - PBService, Change Sources, Change Sources
@@ -2447,7 +2456,7 @@
 
 @code{BonsaiMaildirSource} parses messages sent out by Bonsai.
 
- at node PBChangeSource,  , Other mail notification ChangeSources, Change Sources
+ at node PBChangeSource, P4Source, Other mail notification ChangeSources, Change Sources
 @subsection PBChangeSource
 
 The last kind of ChangeSource actually listens on a TCP port for
@@ -2500,6 +2509,55 @@
 @end table
 
 
+ at node P4Source, , PBChangeSource, Change Sources
+ at subsection P4Source
+
+The @code{P4Source} periodically polls a @uref{http://www.perforce.com/,
+Perforce} depot for changes. It accepts the following arguments:
+
+ at table @samp
+ at item @code{p4base}
+The base depot path to watch, without the trailing '/...'.
+
+ at item @code{p4port}
+The Perforce server to connect to (as host:port).
+
+ at item @code{p4user}
+The Perforce user.
+
+ at item @code{p4passwd}
+The Perforce password.
+
+ at item @code{split_file}
+A function that maps a pathname, without the leading @code{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.
+
+ at item @code{pollinterval}
+How often to poll, in seconds. Defaults to 600 (10 minutes).
+
+ at item @code{histmax}
+The maximum number of changes to inspect at a time. If more than this
+number occur since the last poll, older changes will be silently
+ignored.
+ at end table
+
+ at heading Example
+
+This configuration uses the @code{P4PORT}, @code{P4USER}, and @code{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.
+
+ at example
+import buildbot.changes.p4poller
+c['sources'].append(p4poller.P4Source(
+        p4base='//depot/project/',
+        split_file=lambda branchfile: branchfile.split('/',1)
+))
+ at end example
+
 @node Build Process, Status Delivery, Getting Source Code Changes, Top
 @chapter Build Process
 
@@ -2733,7 +2791,7 @@
 * Mercurial::                   
 * Arch::                        
 * Bazaar::                      
-* P4Sync::                      
+* P4::                          
 @end menu
 
 @node CVS, SVN, Source Checkout, Source Checkout
@@ -3005,7 +3063,7 @@
 
 @end table
 
- at node Bazaar, P4Sync, Arch, Source Checkout
+ at node Bazaar, P4, Arch, Source Checkout
 @subsubsection Bazaar
 
 @cindex Bazaar Checkout
@@ -3021,22 +3079,42 @@
 ourselves).
 
 
- at node P4Sync,  , Bazaar, Source Checkout
- at subsubsection P4Sync
+ at node P4,  , Bazaar, Source Checkout
+ at subsubsection P4
 
 @cindex Perforce Update
 
-The @code{P4Sync} build step performs a
- at uref{http://www.perforce.com/, Perforce} update. It is a temporary
-facility: a more complete P4 checkout step (named @code{P4}) will
-eventually replace it. This step requires significant manual setup on
-each build slave. It takes the following arguments.
+The @code{P4} build step creates a @uref{http://www.perforce.com/,
+Perforce} client specification and performs an update.
 
 @table @code
+ at item p4base
+A view into the Perforce depot without branch name or trailing "...".
+Typically "//depot/proj/".
+ at item defaultBranch
+A branch name to append on build requests if none is specified.
+Typically "trunk".
 @item p4port
-(required): the host:port string describing how to get to the P4 Depot
-(repository), used as the P4PORT environment variable for all p4
-commands
+(optional): the host:port string describing how to get to the P4 Depot
+(repository), used as the -p argument for all p4 commands.
+ at item p4user
+(optional): the Perforce user, used as the -u argument to all p4
+commands.
+ at item p4passwd
+(optional): the Perforce password, used as the -p argument to all p4
+commands.
+ at item p4extra_views
+(optional): a list of (depotpath, clientpath) tuples containing extra
+views to be mapped into the client specification. Both will have
+"/..." appended automatically. The client name and source directory
+will be prepended to the client path.
+ at item p4client
+(optional): The name of the client to use. In mode='copy' and
+mode='update', it's particularly important that a unique name is used
+for each checkout directory to avoid incorrect synchronization. For
+this reason, Python percent substitution will be performed on this value
+to replace %(slave)s with the slave name and %(builder)s with the
+builder name. The default is "buildbot_%(slave)s_%(build)s".
 @end table
 
 @node ShellCommand, Simple ShellCommand Subclasses, Source Checkout, Build Steps





More information about the Commits mailing list