Mercurial > hg > CommitWatcher
comparison commitwatcher/agent.py @ 6:883c88b13142
commitwatcher/agent.py commitwatcher/store.py mozbasewatcher.py
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Fri, 27 Sep 2013 13:03:40 -0700 |
parents | 4cb3971d9d9d |
children | 296af1d32b6a |
comparison
equal
deleted
inserted
replaced
5:d85093ba9f45 | 6:883c88b13142 |
---|---|
2 agents to gather commits | 2 agents to gather commits |
3 """ | 3 """ |
4 | 4 |
5 import feedparser | 5 import feedparser |
6 from .commit import Commit | 6 from .commit import Commit |
7 from .store import MemoryStore | |
7 | 8 |
8 class Agent(object): | 9 class Agent(object): |
9 """abstract base class""" | 10 """abstract base class""" |
10 | 11 |
11 def __init__(self, repository, store): | 12 def __init__(self, repository, store=None): |
12 """ | 13 """ |
13 repository -- repo to monitor | 14 repository -- repo to monitor |
14 """ | 15 """ |
15 self.repository = repository | 16 self.repository = repository |
16 self.store = store | 17 self.store = MemoryStore() if store is None else store |
17 | 18 |
18 | 19 |
19 class LocalCheckoutAgent(object): | 20 class LocalCheckoutAgent(object): |
20 """agent based on local checkouts""" | 21 """agent based on local checkouts""" |
21 | 22 |