# HG changeset patch # User Jeff Hammel # Date 1380312220 25200 # Node ID 883c88b131427d03b59f2d7a7655b07c65e80e53 # Parent d85093ba9f456fe666bad8811f6bfa9ac41bad9d commitwatcher/agent.py commitwatcher/store.py mozbasewatcher.py diff -r d85093ba9f45 -r 883c88b13142 commitwatcher/agent.py --- a/commitwatcher/agent.py Fri Sep 27 11:17:27 2013 -0700 +++ b/commitwatcher/agent.py Fri Sep 27 13:03:40 2013 -0700 @@ -4,16 +4,17 @@ import feedparser from .commit import Commit +from .store import MemoryStore class Agent(object): """abstract base class""" - def __init__(self, repository, store): + def __init__(self, repository, store=None): """ repository -- repo to monitor """ self.repository = repository - self.store = store + self.store = MemoryStore() if store is None else store class LocalCheckoutAgent(object): diff -r d85093ba9f45 -r 883c88b13142 commitwatcher/store.py --- a/commitwatcher/store.py Fri Sep 27 11:17:27 2013 -0700 +++ b/commitwatcher/store.py Fri Sep 27 13:03:40 2013 -0700 @@ -1,5 +1,7 @@ from abc import abstractmethod +__all__ = ['CommitStore', 'MemoryStore'] + class CommitStore(object): """ ABC for commits diff -r d85093ba9f45 -r 883c88b13142 mozbasewatcher.py --- a/mozbasewatcher.py Fri Sep 27 11:17:27 2013 -0700 +++ b/mozbasewatcher.py Fri Sep 27 13:03:40 2013 -0700 @@ -11,8 +11,6 @@ import sys from commitwatcher import FeedAgent -here = os.path.dirname(os.path.realpath(__file__)) - def main(args=sys.argv[1:]): # parse command line args