diff options
-rw-r--r-- | morphlib/buildbranch.py | 9 | ||||
-rw-r--r-- | morphlib/plugins/distbuild_plugin.py | 2 |
2 files changed, 8 insertions, 3 deletions
diff --git a/morphlib/buildbranch.py b/morphlib/buildbranch.py index cfc4a67f..2d529133 100644 --- a/morphlib/buildbranch.py +++ b/morphlib/buildbranch.py @@ -267,6 +267,10 @@ class BuildBranch(object): build_ref, index = self._to_push[self._root] return build_ref + @property + def root_build_commit(self): + return self._root.resolve_ref_to_commit(self.root_build_ref) + def close(self): '''Clean up any resources acquired during operation.''' # TODO: This is a common pattern for our context managers, @@ -328,6 +332,7 @@ def pushed_build_branch(bb, loader, changes_need_pushing, name, email, remote=remote.get_push_url(), chatty=True) bb.push_build_branches(push_cb=report_push) - yield bb.root_repo_url, bb.root_build_ref, bb.root_build_ref + yield bb.root_repo_url, bb.root_build_commit, bb.root_build_ref else: - yield bb.root_local_repo_url, bb.root_build_ref, bb.root_build_ref + yield (bb.root_local_repo_url, bb.root_build_commit, + bb.root_build_ref) diff --git a/morphlib/plugins/distbuild_plugin.py b/morphlib/plugins/distbuild_plugin.py index e18af492..970205c0 100644 --- a/morphlib/plugins/distbuild_plugin.py +++ b/morphlib/plugins/distbuild_plugin.py @@ -55,7 +55,7 @@ class SerialiseArtifactPlugin(cliapp.Plugin): distbuild.add_crash_conditions(self.app.settings['crash-condition']) - if len(args) != 3 and len(args) != 4: + if len(args) not in [3, 4]: raise cliapp.AppException( 'This command takes a repo/ref/morph triplet, and optionally ' 'a ref name.') |