summaryrefslogtreecommitdiff
path: root/morphlib
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2012-09-11 18:05:56 +0100
committerSam Thursfield <sam.thursfield@codethink.co.uk>2012-09-12 14:13:42 +0100
commit4e37fdf5adbf4d25561b472b4089b6782c599f93 (patch)
tree82182fee7bd6f56a91b392c12dfb5cede7b4455b /morphlib
parent6b63ab3036e869c92b3c5d6471e4856df3583019 (diff)
downloadmorph-4e37fdf5adbf4d25561b472b4089b6782c599f93.tar.gz
Don't require .morph in triplet arguments
This gives us consistency with morphologies, where the triplets are repo|ref|morphology, not repo|ref|filename Anyone who runs 'morph build baserock:morphs master system.morph' will now see an error ending with 'was looking for system.morph.morph', which should make it clear where they have gone wrong.
Diffstat (limited to 'morphlib')
-rwxr-xr-xmorphlib/app.py2
-rw-r--r--morphlib/plugins/branch_and_merge_plugin.py5
2 files changed, 4 insertions, 3 deletions
diff --git a/morphlib/app.py b/morphlib/app.py
index 508e0975..cbe8c63d 100755
--- a/morphlib/app.py
+++ b/morphlib/app.py
@@ -173,7 +173,7 @@ class Morph(cliapp.Application):
while args:
assert len(args) >= 2, args
- yield args[0], args[1], args[2]
+ yield args[0], args[1], args[2] + ".morph"
args = args[3:]
def _itertriplets(self, *args):
diff --git a/morphlib/plugins/branch_and_merge_plugin.py b/morphlib/plugins/branch_and_merge_plugin.py
index d6485c2b..2ab18869 100644
--- a/morphlib/plugins/branch_and_merge_plugin.py
+++ b/morphlib/plugins/branch_and_merge_plugin.py
@@ -320,7 +320,8 @@ class BranchAndMergePlugin(cliapp.Plugin):
app = self.app
cache = morphlib.util.new_repo_caches(app)[0]
- for filename in args:
+ for morphology_name in args:
+ filename = morphology_name + '.morph'
with open(filename) as f:
morph = morphlib.morph2.Morphology(f.read())
@@ -708,7 +709,7 @@ class BranchAndMergePlugin(cliapp.Plugin):
build_command)
build_command.build([branch_root,
build_repos[branch_root]['build-ref'],
- '%s.morph' % system_name])
+ system_name])
# Delete the temporary refs on the server.
self.delete_remote_build_refs(build_repos)