From 2c04007fc74d5971b12f351a4c2076e403386997 Mon Sep 17 00:00:00 2001 From: Daniel Silverstone Date: Wed, 5 Sep 2012 17:49:21 +0100 Subject: Return tree SHA1 when looking for ref resolution. Morph now expects the tree SHA1 in addition when resolving references using the cache server. This is to better facilitate correct cache key computation since commits can be made which have no tree changes and thus nothing to usefully affect the build. (For example the morph branch and build features) --- morph-cache-server | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'morph-cache-server') diff --git a/morph-cache-server b/morph-cache-server index bb84915..3a121d4 100755 --- a/morph-cache-server +++ b/morph-cache-server @@ -65,11 +65,12 @@ class MorphCacheServer(cliapp.Application): ref = self._unescape_parameter(request.query.ref) try: response.set_header('Cache-Control', 'no-cache') - sha1 = repo_cache.resolve_ref(repo, ref) + sha1, tree = repo_cache.resolve_ref(repo, ref) return { 'repo': '%s' % repo, 'ref': '%s' % ref, - 'sha1': '%s' % sha1 + 'sha1': '%s' % sha1, + 'tree': '%s' % tree } except Exception, e: response.status = 404 -- cgit v1.2.1