# HG changeset patch # User Jeff Hammel # Date 1324597565 28800 # Node ID 5f286f64ce6e2613071009424c3ce847c64b1668 # Parent 714a7a7f4ea724d17f79ea8ac9cc2e122108ab48 convert to a datetime; i guess you gotta do that now diff -r 714a7a7f4ea7 -r 5f286f64ce6e autobot/changes/poller.py --- a/autobot/changes/poller.py Thu Dec 22 15:39:00 2011 -0800 +++ b/autobot/changes/poller.py Thu Dec 22 15:46:05 2011 -0800 @@ -16,6 +16,7 @@ import os import time import tempfile +from datetime import datetime from twisted.python import log from twisted.internet import defer, utils @@ -27,6 +28,8 @@ them to the change master. """ + src = '' + compare_attrs = ["repourl", "branch", "workdir", "pollInterval", "binary", "usetimestamps", "category", "project"] @@ -214,7 +217,12 @@ def _add_change(self, _, rev): log.msg("_add_change results: %s" % self.commitInfo) + # convert the timestamp into a datetime object + # (required in buildbot 0.8.5) timestamp = self.commitInfo['timestamp'] + if isinstance(timestamp, int) or isinstance(timestamp, float): + timestamp = datetime.fromtimestamp(timestamp) + self.log('timestamp: %s' % timestamp) # send the change to the master @@ -237,7 +245,7 @@ category=self.category, project=self.project, repository=self.repourl, - src=self.name) + src=self.src) self.lastChange = self.lastPoll @@ -272,6 +280,8 @@ class HgPoller(Poller): """poller for a mercurial source""" + src = 'hg' + def __init__(self, repourl, binary='hg', branch='default', **kwargs): Poller.__init__(self, repourl, binary=binary, branch=branch, **kwargs) @@ -416,6 +426,8 @@ class GitPoller(Poller): + src = 'git' + def __init__(self, repourl, binary='git', branch='master', **kwargs): Poller.__init__(self, repourl, binary=binary, branch=branch, **kwargs)