summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2012-12-05 13:31:39 +0000
committerRichard Maw <richard.maw@codethink.co.uk>2012-12-05 13:31:39 +0000
commit7ad595158d402f926c99d2534167b5424ecedb9f (patch)
treede0ec3db51b24a3c16656beb67ba273550e8ce40
parenta1232696c7e57d98cb1bc3b093cde6f8c4eff5e6 (diff)
downloadmorph-cache-server-baserock/richardmaw/work-with-morph-caches-again.tar.gz
Fix cache refs after repo cache format changebaserock/richardmaw/work-with-morph-caches-again
Repositories in morph's repository cache used to be like clones, in that they had remotes. Now they are more like mirrors, which have the refs unaltered. Now this will work even if the cache server is not run in direct mode.
-rw-r--r--morphcacheserver/repocache.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/morphcacheserver/repocache.py b/morphcacheserver/repocache.py
index 9675e04..8576886 100644
--- a/morphcacheserver/repocache.py
+++ b/morphcacheserver/repocache.py
@@ -60,10 +60,7 @@ class RepoCache(object):
raise RepositoryNotFoundError(repo_url)
try:
refs = self._show_ref(repo_dir, ref).split('\n')
- if self.direct_mode:
- refs = [x.split() for x in refs]
- else:
- refs = [x.split() for x in refs if 'origin' in x]
+ refs = [x.split() for x in refs]
return refs[0][0], self._tree_from_commit(repo_dir, refs[0][0])
except cliapp.AppException: