diff options
author | Jannis Pohlmann <jannis.pohlmann@codethink.co.uk> | 2012-01-31 16:38:18 +0000 |
---|---|---|
committer | Jannis Pohlmann <jannis.pohlmann@codethink.co.uk> | 2012-01-31 16:42:41 +0000 |
commit | c2104eb199916f9ef7e7b77d0eebf33619ed3ea9 (patch) | |
tree | 01eb904eda1461bf70ecf97aa8f6445d0bbfbb07 /morphlib/morphology.py | |
parent | ab965be42d10f2608dc883ee0cc34a1cd0fe5058 (diff) | |
download | morph-c2104eb199916f9ef7e7b77d0eebf33619ed3ea9.tar.gz |
Properly unpack dependencies into the staging area in build-single.
This requires build-single to take a dependency context tuple when
building chunks of a stratum. This context tuple is the surrounding
stratum which is used to construct the dependency graph in the worker
and then do a breadth-first search to collect all dependencies that need
to be added to the staging area.
Implementing this required a few hash/eq changes in Blob, Morphology
and Treeish as well as a few adjustments in the corresponding unit
tests.
Diffstat (limited to 'morphlib/morphology.py')
-rw-r--r-- | morphlib/morphology.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/morphlib/morphology.py b/morphlib/morphology.py index 2b8c0551..734c4e3d 100644 --- a/morphlib/morphology.py +++ b/morphlib/morphology.py @@ -108,6 +108,13 @@ class Morphology(object): def test_stories(self): return self._dict.get('test-stories', []) + def __eq__(self, other): + return (self.filename == other.filename and + self.treeish == other.treeish) + + def __hash__(self): + return hash((self.filename, self.treeish)) + def __str__(self): # pragma: no cover return '%s|%s|%s' % (self.treeish.original_repo, self.treeish.ref, |