| OLD | NEW |
| 1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import logging | 5 import logging |
| 6 import time | 6 import time |
| 7 import traceback | 7 import traceback |
| 8 | 8 |
| 9 from app_yaml_helper import AppYamlHelper | 9 from app_yaml_helper import AppYamlHelper |
| 10 from appengine_wrappers import ( | 10 from appengine_wrappers import ( |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 channel, delegate.GetAppVersion(), safe_revision)) | 209 channel, delegate.GetAppVersion(), safe_revision)) |
| 210 | 210 |
| 211 return self._CreateServerInstance(channel, safe_revision) | 211 return self._CreateServerInstance(channel, safe_revision) |
| 212 | 212 |
| 213 def _CreateObjectStoreCreator(self, channel): | 213 def _CreateObjectStoreCreator(self, channel): |
| 214 return ObjectStoreCreator(channel, start_empty=True) | 214 return ObjectStoreCreator(channel, start_empty=True) |
| 215 | 215 |
| 216 def _GetBranchForChannel(self, channel): | 216 def _GetBranchForChannel(self, channel): |
| 217 object_store_creator = self._CreateObjectStoreCreator(channel) | 217 object_store_creator = self._CreateObjectStoreCreator(channel) |
| 218 return (self._delegate.CreateBranchUtility(object_store_creator) | 218 return (self._delegate.CreateBranchUtility(object_store_creator) |
| 219 .GetBranchForChannel(channel)) | 219 .GetChannelInfo(channel).branch) |
| 220 | 220 |
| 221 def _CreateServerInstance(self, channel, revision): | 221 def _CreateServerInstance(self, channel, revision): |
| 222 object_store_creator = self._CreateObjectStoreCreator(channel) | 222 object_store_creator = self._CreateObjectStoreCreator(channel) |
| 223 host_file_system = CachingFileSystem( | 223 host_file_system = CachingFileSystem( |
| 224 self._delegate.CreateHostFileSystemForBranchAndRevision( | 224 self._delegate.CreateHostFileSystemForBranchAndRevision( |
| 225 self._GetBranchForChannel(channel), | 225 self._GetBranchForChannel, |
| 226 revision), | 226 revision), |
| 227 object_store_creator) | 227 object_store_creator) |
| 228 app_samples_file_system = self._delegate.CreateAppSamplesFileSystem( | 228 app_samples_file_system = self._delegate.CreateAppSamplesFileSystem( |
| 229 object_store_creator) | 229 object_store_creator) |
| 230 def create_file_system(branch): |
| 231 object_store_creator = self._CreateObjectStoreCreator(branch) |
| 232 return CachingFileSystem(SubversionFileSystem.Create(branch), |
| 233 object_store_creator) |
| 230 return ServerInstance(channel, | 234 return ServerInstance(channel, |
| 231 object_store_creator, | 235 object_store_creator, |
| 232 host_file_system, | 236 host_file_system, |
| 233 app_samples_file_system) | 237 app_samples_file_system, |
| 238 create_file_system) |
| OLD | NEW |