summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2013-10-14 15:48:02 +0000
committerRichard Maw <richard.maw@codethink.co.uk>2013-10-14 15:53:52 +0000
commitbd6ef795d713edf0beeaee509a095239be943366 (patch)
treecb46458607e1d0b8c5f00825e2f80d6096fcfb03
parent3a88533d4adb3fe94ae4c09ba0693d2ab761d8e0 (diff)
downloadmorph-bd6ef795d713edf0beeaee509a095239be943366.tar.gz
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.
-rw-r--r--morphlib/plugins/branch_and_merge_plugin.py4
1 files 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(