changeset 171:af76bbcc4457

add a dummy catch up function; this should work (at least in theory) as-is, though it might be better to FETCH earlier and pull now
author Jeff Hammel <jhammel@mozilla.com>
date Mon, 31 Jan 2011 18:28:58 -0800
parents 274d7dc787e3
children b96f1e121451
files autobot/changes/poller.py
diffstat 1 files changed, 14 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/autobot/changes/poller.py	Mon Jan 31 18:26:35 2011 -0800
+++ b/autobot/changes/poller.py	Mon Jan 31 18:28:58 2011 -0800
@@ -437,6 +437,20 @@
         d.addCallback(split_changes)
         return d
 
+    def _catch_up(self, rev):
+        if self.changeCount == 0:
+            self.log('%s: no changes, no catch_up' % self.postHash)
+            return
+        self.log('catching up to %s' % self.postHash)
+
+        # XXX keeping this in as a dummy for now
+        # should *really* do fetch earlier and *now* do pull
+        # (or whatever)
+        args = ['status']
+        d = utils.getProcessOutputAndValue(self.binary, args, path=self.workdir, env=dict(PATH=os.environ['PATH']))
+        d.addCallback(self._convert_nonzero_to_failure)
+        return d
+
     ### metadata for commits
 
     ### timestamp