Skip to content

Commit

Permalink
* add command line entry point for synk-mozbase
Browse files Browse the repository at this point in the history
* docstring detailing basic strategy
  • Loading branch information
Jeff Hammel committed Apr 3, 2012
1 parent e579972 commit ccec293
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
kw['entry_points'] = """
[console_scripts]
synkamatic = synkamatic.main:main
synk-mozbase = synkamatic.mozbase:main
"""
kw['install_requires'] = dependencies
except ImportError:
Expand Down
8 changes: 8 additions & 0 deletions synkamatic/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,16 @@


class Synkamatic(object):
"""
sync mozilla repositories <-> github
using pulse messages for communication and
bugzilla and github pull-requests as
human-moderatable media
"""

paths = [] # a list of regex's to match against paths in hg
github = None # github repository
bugzilla = 'https://api-dev.bugzilla.mozilla.org/latest/' # REST API for bugzilla

def __init__(self, github=None, paths=None, tree='mozilla-central'):
self.github = github or self.github
Expand Down
13 changes: 11 additions & 2 deletions synkamatic/mozbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,24 @@
https://github.com/mozilla/mozbase
"""

import sys
from api import Synkamatic

class Mozbase(Synkamatic):
"""
Synkamatic class for Mozbase
https://wiki.mozilla.org/Auto-tools/Projects/MozBase
"""

paths = ['testing/mozbase/'] # regex strings that represent paths in m-c
github = 'https://github.com/mozilla/mozbase'


# for testing...
if __name__ == "__main__":
def main(args=sys.argv[:]):
synk = Mozbase()
synk.start_pulse_listener()

if __name__ == "__main__":
main()


0 comments on commit ccec293

Please sign in to comment.