From bd6ef795d713edf0beeaee509a095239be943366 Mon Sep 17 00:00:00 2001 From: Richard Maw Date: Mon, 14 Oct 2013 15:48:02 +0000 Subject: build-without-push: Handle null repo/ref This wasn't working, since the build-without-push code works by including morphologies that have had their ref changed to the branch's name. This is not done by edit if it is null, since the extra ref resolution can cause interesting issues. Instead of changing edit to continue to alter the ref, build will now allow null meaning this current repo/ref. This has the side-effect of also checking morphologies referred to by a null ref, even if they aren't altered, but it still works correctly. --- morphlib/plugins/branch_and_merge_plugin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/morphlib/plugins/branch_and_merge_plugin.py b/morphlib/plugins/branch_and_merge_plugin.py index fec16415..990fe100 100644 --- a/morphlib/plugins/branch_and_merge_plugin.py +++ b/morphlib/plugins/branch_and_merge_plugin.py @@ -1638,7 +1638,7 @@ class BranchAndMergePlugin(cliapp.Plugin): } def add_morphology_info(info, category): - repo = info['repo'] + repo = info['repo'] or branch_root if repo in build_repos: repo_dir = build_repos[repo]['dirname'] else: @@ -1658,7 +1658,7 @@ class BranchAndMergePlugin(cliapp.Plugin): # building this system from the system branch. system_morphology = self.load_morphology(branch_root_dir, system_name) for info in system_morphology['strata']: - if info['ref'] == system_branch: + if info['ref'] == system_branch or info['ref'] is None: repo_dir = add_morphology_info(info, 'strata') if repo_dir: stratum_morphology = self.load_morphology( -- cgit v1.2.1