diff options
author | Adam Coldrick <adam.coldrick@codethink.co.uk> | 2014-07-03 13:42:57 +0000 |
---|---|---|
committer | Adam Coldrick <adam.coldrick@codethink.co.uk> | 2014-07-14 13:44:18 +0000 |
commit | 716d2cd36ddb57d0ad1e9f022079728c4c0fb43e (patch) | |
tree | 43ec109afdf61783e8d7090555d40980cc8ff58e | |
parent | af3464e343bcc1f73f7a54741b66dd02cb2d8151 (diff) | |
download | morph-716d2cd36ddb57d0ad1e9f022079728c4c0fb43e.tar.gz |
Add information about the whereabouts of the morphology to Sources
In order to maintain the ability to keep chunk morphologies in the
source repository as well as in the definitions repository the Source
object for a chunk needs to be able to know about two different
repositories, one for the morphology and one for the chunk source.
-rw-r--r-- | morphlib/app.py | 3 | ||||
-rw-r--r-- | morphlib/artifactresolver.py | 4 | ||||
-rw-r--r-- | morphlib/plugins/update_gits_plugin.py | 5 |
3 files changed, 6 insertions, 6 deletions
diff --git a/morphlib/app.py b/morphlib/app.py index e0874317..6db2cc38 100644 --- a/morphlib/app.py +++ b/morphlib/app.py @@ -291,7 +291,8 @@ class Morph(cliapp.Application): def add_to_pool(reponame, ref, filename, absref, tree, morphology): source = morphlib.source.Source(reponame, ref, absref, tree, - morphology, filename) + morphology, filename, + morphology_repo, morphology_ref) pool.add(source) self.traverse_morphs([triplet], lrc, rrc, diff --git a/morphlib/artifactresolver.py b/morphlib/artifactresolver.py index 9e3cea48..066ac1be 100644 --- a/morphlib/artifactresolver.py +++ b/morphlib/artifactresolver.py @@ -194,9 +194,7 @@ class ArtifactResolver(object): filename = morphlib.util.sanitise_morphology_path( info.get('morph', info['name'])) chunk_source = self._source_pool.lookup( - info['repo'], - info['ref'], - filename) + info['repo'], info['ref'], filename) chunk_name = chunk_source.morphology['name'] diff --git a/morphlib/plugins/update_gits_plugin.py b/morphlib/plugins/update_gits_plugin.py index 46686391..fa530698 100644 --- a/morphlib/plugins/update_gits_plugin.py +++ b/morphlib/plugins/update_gits_plugin.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012-2013 Codethink Limited +# Copyright (C) 2012-2014 Codethink Limited # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -60,7 +60,8 @@ class UpdateGitsPlugin(cliapp.Plugin): subs_to_process = set() - def visit(reponame, ref, filename, absref, tree, morphology): + def visit(reponame, ref, filename, absref, tree, morphology, + morphology_repo, morphology_ref): app.status(msg='Updating %(repo_name)s %(ref)s %(filename)s', repo_name=reponame, ref=ref, filename=filename) assert cache.has_repo(reponame) |