Sophie

Sophie

distrib > Fedora > 16 > i386 > by-pkgid > 9457b02689c69e152aa2cda68176fa51 > files > 88

buildbot-doc-0.8.4p1-2.fc16.noarch.rpm

<html lang="en">
<head>
<title>GitPoller - BuildBot Manual - 0.8.4p1</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="BuildBot Manual - 0.8.4p1">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Change-Sources.html#Change-Sources" title="Change Sources">
<link rel="prev" href="GoogleCodeAtomPoller.html#GoogleCodeAtomPoller" title="GoogleCodeAtomPoller">
<link rel="next" href="GerritChangeSource.html#GerritChangeSource" title="GerritChangeSource">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
This is the BuildBot manual for Buildbot version 0.8.4p1.

Copyright (C) 2005, 2006, 2009, 2010 Brian Warner

Copying and distribution of this file, with or without
modification, are permitted in any medium without royalty
provided the copyright notice and this notice are preserved.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
  pre.display { font-family:inherit }
  pre.format  { font-family:inherit }
  pre.smalldisplay { font-family:inherit; font-size:smaller }
  pre.smallformat  { font-family:inherit; font-size:smaller }
  pre.smallexample { font-size:smaller }
  pre.smalllisp    { font-size:smaller }
  span.sc    { font-variant:small-caps }
  span.roman { font-family:serif; font-weight:normal; } 
  span.sansserif { font-family:sans-serif; font-weight:normal; } 
--></style>
</head>
<body>
<div class="node">
<a name="GitPoller"></a>
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="GerritChangeSource.html#GerritChangeSource">GerritChangeSource</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="GoogleCodeAtomPoller.html#GoogleCodeAtomPoller">GoogleCodeAtomPoller</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Change-Sources.html#Change-Sources">Change Sources</a>
<hr>
</div>

<h4 class="subsection">4.7.9 GitPoller</h4>

<p><a name="index-buildbot_002echanges_002egitpoller_002eGitPoller-48"></a>
If you cannot take advantage of post-receive hooks as provided by
<code>contrib/git_buildbot.py</code> for example, then you can use the <code>GitPoller</code>.

   <p>The <code>GitPoller</code> periodically fetches from a remote git repository and
processes any changes. It requires its own working directory for operation, which
can be specified via the <code>workdir</code> property. By default a temporary directory will
be used.

   <p>The <code>GitPoller</code> only works with git <code>1.7</code> and up, out of the
box.  If you're using earlier versions of git, you can get things to
work by manually creating an empty repository in
<code>&lt;tempdir&gt;/gitpoller_work</code>.

   <p><code>GitPoller</code> accepts the following arguments:

     <dl>
<dt><code>repourl</code><dd>the git-url that describes the remote repository, e.g. <code>git@example.com:foobaz/myrepo.git</code>
(see the <code>git fetch</code> help for more info on git-url formats)

     <br><dt><code>branch</code><dd>the desired branch to fetch, will default to <code>'master'</code>

     <br><dt><code>workdir</code><dd>the directory where the poller should keep its local repository. will default
to <code>&lt;tempdir&gt;/gitpoller_work</code>, which is probably not what you want.  If
this is a relative path, it will be interpreted relative to the master's
basedir.

     <br><dt><code>pollInterval</code><dd>interval in seconds between polls, default is 10 minutes.

     <br><dt><code>gitbin</code><dd>path to the git binary, defaults to just <code>'git'</code>

     <br><dt><code>fetch_refspec</code><dd>One or more refspecs to use when fetching updates for the repository. By default,
the <code>GitPoller</code> will simply fetch all refs. If your repository is large
enough that this would be unwise (or active enough on irrelevant branches that
it'd be a waste of time to fetch them all), you may wish to specify only a certain
refs to be updated. (A single refspec may be passed as a string, or multiple refspecs
may be passed as a list or set of strings.)

     <br><dt><code>category</code><dd>Set the category to be used for the changes produced by the <code>GitPoller</code>. 
This will then be set in any changes generated by the <code>GitPoller</code>, and can
be used in a Change Filter for triggering particular builders.

     <br><dt><code>project</code><dd>Set the name of the project to be used for the <code>GitPoller</code>. 
This will then be set in any changes generated by the <code>GitPoller</code>,
and can be used in a Change Filter for triggering particular builders.

     <br><dt><code>usetimestamps</code><dd>parse each revision's commit timestamp (default is <code>True</code>), or ignore it in favor of the current time (so recently processed commits appear together in the waterfall page)

     <br><dt><code>encoding</code><dd>Set encoding will be used to parse author's name and commit message. Default
encoding is <code>'utf-8'</code>. This will not be applied to file names since git
will translate non-ascii file names to unreadable escape sequences.

   </dl>

<h3 class="heading">Example</h3>

<pre class="example">     from buildbot.changes.gitpoller import GitPoller
     c['change_source'] = GitPoller('git@example.com:foobaz/myrepo.git',
                                    branch='great_new_feature',
                                    workdir='/home/buildbot/gitpoller_workdir')
</pre>
   </body></html>