summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Ipsum <richardipsum@fastmail.co.uk>2014-10-27 17:06:54 +0000
committerRichard Ipsum <richardipsum@fastmail.co.uk>2014-10-28 14:04:06 +0000
commit42c7735d8d4107e3560b97913513ae8fdb96c69d (patch)
tree31202707ec0d25fd3cb67aa38b4f3d35466be0e9
parent71fbade1fdb5e0d578b9f0ec06d44b69951b8af8 (diff)
downloadmorph-42c7735d8d4107e3560b97913513ae8fdb96c69d.tar.gz
Make pushed_build_branch always return (url, commit, ref)
-rw-r--r--morphlib/buildbranch.py9
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)