Mercurial > hg > CommitWatcher
annotate commitwatcher/event.py @ 39:b04538e7f9f3
stub
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Tue, 05 Nov 2013 02:08:21 -0800 |
parents | 798b747b65d6 |
children | 97dfcdeb9a4e |
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): | |
37 | 18 pass # TODO: move path handling -> commit object |