# HG changeset patch # User Jeff Hammel # Date 1296522354 28800 # Node ID 6396220f937ef4eadcb034fd49a1f230b6023ab5 # Parent 8fbeb71aa9915320a010ebc29abfe3cda5b9340f stubbing a *working* gitpoller, thank you very much diff -r 8fbeb71aa991 -r 6396220f937e autobot/changes/poller.py --- 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'))