diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2013-09-26 11:20:34 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2013-09-26 11:21:09 +0000 |
commit | 151050c5b15e83cbfc6ac9fcd786dcb957022185 (patch) | |
tree | c3da24c1a3d3b2f2f76fb7c012cd7149d8729262 /morphlib/plugins | |
parent | 6a216934edb2423c9aa347329ea029041927a413 (diff) | |
download | morph-151050c5b15e83cbfc6ac9fcd786dcb957022185.tar.gz |
Make branch commands work with null refs
Diffstat (limited to 'morphlib/plugins')
-rw-r--r-- | morphlib/plugins/branch_and_merge_new_plugin.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/morphlib/plugins/branch_and_merge_new_plugin.py b/morphlib/plugins/branch_and_merge_new_plugin.py index 39552ef0..edda7d9c 100644 --- a/morphlib/plugins/branch_and_merge_new_plugin.py +++ b/morphlib/plugins/branch_and_merge_new_plugin.py @@ -266,7 +266,9 @@ class SimpleBranchAndMergePlugin(cliapp.Plugin): # of triplets (repo url, ref, filename). return [ - (spec['repo'], spec['ref'], '%s.morph' % spec['morph']) + (spec['repo'] or morph.repo_url, + spec['ref'] or morph.ref, + '%s.morph' % spec['morph']) for spec in specs ] @@ -679,6 +681,9 @@ class SimpleBranchAndMergePlugin(cliapp.Plugin): #TODO: Stop using app.resolve_ref def resolve_refs(morphs): for repo, ref in morphs.list_refs(): + # You can't resolve null refs, so don't attempt to. + if repo is None or ref is None: + continue # TODO: Handle refs that are only in workspace in general if (repo == sb.root_repository_url and ref == sb.system_branch_name): |