summaryrefslogtreecommitdiff
path: root/morphlib/source.py
diff options
context:
space:
mode:
authorJannis Pohlmann <jannis.pohlmann@codethink.co.uk>2012-09-05 17:12:26 +0000
committerJannis Pohlmann <jannis.pohlmann@codethink.co.uk>2012-09-05 17:12:26 +0000
commitb9488584415d94fc28c2e064b917183b851af07b (patch)
treeebdb4f647c43afd633fcc5243e26ef24c6096628 /morphlib/source.py
parent083fd4de011e0fcf4a445b38a7fa6ef8964a5ccb (diff)
downloadmorph-b9488584415d94fc28c2e064b917183b851af07b.tar.gz
Resolve tree SHA1 along with commit SHA1 when resolving refs
Adjust all other parts and the tests to work with this.
Diffstat (limited to 'morphlib/source.py')
-rw-r--r--morphlib/source.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/morphlib/source.py b/morphlib/source.py
index fceed9ef..ed62ea4a 100644
--- a/morphlib/source.py
+++ b/morphlib/source.py
@@ -27,6 +27,7 @@ class Source(object):
* ``repo_name`` -- name of the git repository which contains the source
* ``original_ref`` -- the git ref provided by the user or a morphology
* ``sha1`` -- the absolute git commit id for the revision we use
+ * ``tree`` -- the SHA1 of the tree corresponding to the commit
* ``morphology`` -- the in-memory representation of the morphology we use
* ``filename`` -- basename of the morphology filename
* ``dependencies`` -- list of Sources for build dependencies for us
@@ -37,11 +38,13 @@ class Source(object):
'''
- def __init__(self, repo_name, original_ref, sha1, morphology, filename):
+ def __init__(self, repo_name, original_ref, sha1, tree, morphology,
+ filename):
self.repo = None
self.repo_name = repo_name
self.original_ref = original_ref
self.sha1 = sha1
+ self.tree = tree
self.morphology = morphology
self.filename = filename