Sophie

Sophie

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

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

<html lang="en">
<head>
<title>GerritStatusPush - 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="Status-Targets.html#Status-Targets" title="Status Targets">
<link rel="prev" href="HttpStatusPush.html#HttpStatusPush" title="HttpStatusPush">
<link rel="next" href="Writing-New-Status-Plugins.html#Writing-New-Status-Plugins" title="Writing New Status Plugins">
<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="GerritStatusPush"></a>
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="Writing-New-Status-Plugins.html#Writing-New-Status-Plugins">Writing New Status Plugins</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="HttpStatusPush.html#HttpStatusPush">HttpStatusPush</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Status-Targets.html#Status-Targets">Status Targets</a>
<hr>
</div>

<h4 class="subsection">4.14.7 GerritStatusPush</h4>

<p><a name="index-GerritStatusPush-153"></a><a name="index-buildbot_002estatus_002estatus_005fgerrit_002eGerritStatusPush-154"></a>

<pre class="example">     from buildbot.status.status_gerrit import GerritStatusPush
     
     def gerritReviewCB(builderName, build, result, arg):
         message =  "Buildbot finished compiling your patchset\n"
         message += "on configuration: %s\n" % builderName
         message += "The result is: %s\n" % Results[result].upper()
     
         if arg:
             message += "\nFor more details visit:\n"
             message += "%sbuilders/%s/builds/%d\n" % (arg, builderName, build.getNumber())
     
         # message, verified, reviewed
         return message, (result == 0 or -1), 0
     
     c['buildbotURL'] = 'http://buildbot.example.com/'
     c['status'].append(GerritStatusPush('127.0.0.1', 'buildbot',
                                         reviewCB=gerritReviewCB,
                                         reviewArg=c['buildbotURL']))
</pre>
   <p>GerritStatusPush sends review of the Change back to the Gerrit server.

   </body></html>