changeset 165:6396220f937e

stubbing a *working* gitpoller, thank you very much
author Jeff Hammel <jhammel@mozilla.com>
date Mon, 31 Jan 2011 17:05:54 -0800
parents 8fbeb71aa991
children dba6bcae1575
files autobot/changes/poller.py
diffstat 1 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/autobot/changes/poller.py	Mon Jan 31 17:01:20 2011 -0800
+++ b/autobot/changes/poller.py	Mon Jan 31 17:05:54 2011 -0800
@@ -132,11 +132,11 @@
 
     def _setPreHash(self, _hash):
         self.preHash = _hash.strip()
-        log.msg("The secret key is %s" % self.preHash)
+        log.msg("preHash is %s" % self.preHash)
 
     def _setPostHash(self, _hash):
         self.postHash = _hash.strip()
-        log.msg("The *NEW* secret key is %s" % self.postHash)
+        log.msg("postHash is %s" % self.postHash)
 
     def _get_changes(self):
         """update the changes if the hash doesnt match"""
@@ -151,7 +151,6 @@
             d.addCallback(self.initRepository)
 
         # get the hash before updating
-        log.msg("About to get prehash")
         d.addCallback(self._hash)
         d.addCallback(self._setPreHash)
 
@@ -254,6 +253,7 @@
         Poller.__init__(self, repourl, binary=binary, branch=branch, **kwargs)
 
     def isInitialized(self):
+        """is the repository initialized?"""
         return os.path.exists(os.path.join(self.workdir, '.hg'))
 
     def initializationCommands(self):
@@ -382,3 +382,7 @@
 
     def __init__(self, repourl, binary='git', branch='master', **kwargs):
         Poller.__init__(self, repourl, binary=binary, branch=branch, **kwargs)
+
+    def isInitialized(self):
+        """is the repository initialized?"""
+        return os.path.exists(os.path.join(self.workdir, '.git'))