Mercurial > hg > CommitWatcher
annotate commitwatcher/event.py @ 34:463dc92867df
commitwatcher/event.py
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Sun, 13 Oct 2013 19:17:34 -0700 |
parents | 9a76064ea527 |
children | 798b747b65d6 |
rev | line source |
---|---|
33 | 1 """ |
2 event system for watching commits | |
3 """ | |
4 | |
34 | 5 from abc import abstractmethod |
6 | |
33 | 7 class EventHandler(object): |
8 """ABC for events""" | |
9 | |
34 | 10 def match(self, commit): |
11 """does this event trigger the handler?""" | |
12 return True # abstractmethod | |
13 | |
33 | 14 class PathEventHandler(EventHandler): |
15 """events based on paths""" | |
34 | 16 |
17 def match(self, commit): | |
18 pass # TODO: move path handling -> commit object |