# HG changeset patch # User Jeff Hammel # Date 1296521346 28800 # Node ID c8596f7a9a291a741533ae3ae3ffdd7c284b3fa4 # Parent 57e82f26fcf2e59f963c296555044396f62ab324 remove *more* commented code diff -r 57e82f26fcf2 -r c8596f7a9a29 autobot/changes/poller.py --- a/autobot/changes/poller.py Mon Jan 31 16:42:03 2011 -0800 +++ b/autobot/changes/poller.py Mon Jan 31 16:49:06 2011 -0800 @@ -19,7 +19,6 @@ from twisted.python import log from twisted.internet import defer, utils -#from buildbot.util import deferredLocked from buildbot.changes import base, changes class Poller(base.PollingChangeSource): @@ -62,6 +61,9 @@ self.name = '%s: %s#%s' % (self.__class__.__name__, repourl, branch) +# XXX this is commented out because of race conditions on startup +# instead, the repository is just made if it doesn't exist + # def startService(self): # base.PollingChangeSource.startService(self) @@ -202,12 +204,6 @@ d.addCallback(self._add_change, rev) return d - # get metadata -# dl = defer.DeferredList([ -# ], consumeErrors=True) - -# # add the change, apparently -# dl.addCallback(self._add_change, rev) def _add_change(self, _, rev): @@ -380,3 +376,11 @@ stripped_output = output.strip() self.commitInfo['comments'] = stripped_output return self.commitInfo['comments'] + + +### + +class GitPoller(Poller): + + def __init__(self, repourl, binary='git', branch='master', **kwargs): + Poller.__init__(self, repourl, binary=binary, branch=branch, **kwargs)