diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2013-01-29 12:18:09 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2013-02-11 14:12:14 +0000 |
commit | 6e048eeac64773072bda9a70fcf15b33ab0c7765 (patch) | |
tree | f79afdb396286a1fead597caf372d447c84d36c3 /morphlib | |
parent | aa644f02e326f1bc67d77e32c772dee91f876fc0 (diff) | |
download | morph-6e048eeac64773072bda9a70fcf15b33ab0c7765.tar.gz |
Make metadata include the repo-alias.
This is required for reproducing the morphologies that created the
artifacts.
It is possible, but expensive, to `unexpand` a url, provided your
repository aliases are the same as the morphology's, but this may
not always be the case.
Diffstat (limited to 'morphlib')
-rw-r--r-- | morphlib/builder2.py | 1 | ||||
-rw-r--r-- | morphlib/builder2_tests.py | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/morphlib/builder2.py b/morphlib/builder2.py index 9ed75397..68768699 100644 --- a/morphlib/builder2.py +++ b/morphlib/builder2.py @@ -200,6 +200,7 @@ class BuilderBase(object): 'kind': self.artifact.source.morphology['kind'], 'description': self.artifact.source.morphology['description'], 'repo': self.artifact.source.repo.url, + 'repo-alias': self.artifact.source.repo_name, 'original_ref': self.artifact.source.original_ref, 'sha1': self.artifact.source.sha1, 'morphology': self.artifact.source.filename, diff --git a/morphlib/builder2_tests.py b/morphlib/builder2_tests.py index ccf3bc81..df07a59f 100644 --- a/morphlib/builder2_tests.py +++ b/morphlib/builder2_tests.py @@ -1,4 +1,4 @@ -# Copyright (C) 2012 Codethink Limited +# Copyright (C) 2012-2013 Codethink Limited # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -50,6 +50,7 @@ class FakeSource(object): self.repo = morphlib.cachedrepo.CachedRepo(FakeApp(), 'repo', 'url', 'path') + self.repo_name = 'url' self.original_ref = 'e' self.sha1 = 'f' self.filename = 'g' |