summaryrefslogtreecommitdiff
path: root/morph
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2011-11-02 14:37:35 +0000
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2011-11-02 14:37:35 +0000
commitb45c93ff4d7029065ccd26cad3f69cf2f30461da (patch)
treea60b3544704cc656577eb7fba1f52d8a73caf173 /morph
parentb90aad231183b5bdf7116711f82c93201ce086c8 (diff)
downloadmorph-b45c93ff4d7029065ccd26cad3f69cf2f30461da.tar.gz
Always get all morphologies from git
Previously, we've been able to get morphs for strata and systems directly from files, with uncommitted changes. No more.
Diffstat (limited to 'morph')
-rwxr-xr-xmorph19
1 files changed, 12 insertions, 7 deletions
diff --git a/morph b/morph
index d4378c42..478fa52f 100755
--- a/morph
+++ b/morph
@@ -47,17 +47,22 @@ class Morph(cliapp.Application):
metavar='N',
default=0)
- def cmd_build(self, morph_filenames):
+ def cmd_build(self, args):
tempdir = morphlib.tempdir.Tempdir()
builder = morphlib.builder.Builder(tempdir, self.msg, self.settings)
- for name in morph_filenames:
- self.msg('Building morphology %s' % name)
- with self.open_input(name, 'r') as f:
- morph = morphlib.morphology.Morphology(f,
- baseurl=self.settings['git-base-url'])
- builder.build(morph, '', '')
+
+ while len(args) >= 3:
+ repo, ref, filename = args[:3]
+ args = args[3:]
+ self.msg('Building %s - %s - %s' % (repo, ref, filename))
+ builder.build(repo, ref, filename)
+
tempdir.remove()
+ if args:
+ raise cliapp.AppException('Extra args on command line: %s' % args)
+
+
def msg(self, msg):
'''Show a message to the user about what is going on.'''
logging.debug(msg)