diff options
author | Richard Ipsum <richardipsum@fastmail.co.uk> | 2014-10-27 17:06:54 +0000 |
---|---|---|
committer | Richard Ipsum <richardipsum@fastmail.co.uk> | 2014-10-28 14:04:06 +0000 |
commit | 42c7735d8d4107e3560b97913513ae8fdb96c69d (patch) | |
tree | 31202707ec0d25fd3cb67aa38b4f3d35466be0e9 /morphlib/buildbranch.py | |
parent | 71fbade1fdb5e0d578b9f0ec06d44b69951b8af8 (diff) | |
download | morph-42c7735d8d4107e3560b97913513ae8fdb96c69d.tar.gz |
Make pushed_build_branch always return (url, commit, ref)
Diffstat (limited to 'morphlib/buildbranch.py')
-rw-r--r-- | morphlib/buildbranch.py | 9 |
1 files changed, 7 insertions, 2 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) |