Mercurial > hg > CommitWatcher
comparison 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 |
comparison
equal
deleted
inserted
replaced
33:9a76064ea527 | 34:463dc92867df |
---|---|
1 """ | 1 """ |
2 event system for watching commits | 2 event system for watching commits |
3 """ | 3 """ |
4 | 4 |
5 from abc import abstractmethod | |
6 | |
5 class EventHandler(object): | 7 class EventHandler(object): |
6 """ABC for events""" | 8 """ABC for events""" |
7 | 9 |
10 def match(self, commit): | |
11 """does this event trigger the handler?""" | |
12 return True # abstractmethod | |
13 | |
8 class PathEventHandler(EventHandler): | 14 class PathEventHandler(EventHandler): |
9 """events based on paths""" | 15 """events based on paths""" |
16 | |
17 def match(self, commit): | |
18 pass # TODO: move path handling -> commit object |