Index: chrome/common/extensions/docs/server2/cron_servlet.py |
diff --git a/chrome/common/extensions/docs/server2/cron_servlet.py b/chrome/common/extensions/docs/server2/cron_servlet.py |
index b3d4953aac061023007ce0606734fe39259dd29b..df3c16e06814d99d5dcd8666eab558bd9c9b8b83 100644 |
--- a/chrome/common/extensions/docs/server2/cron_servlet.py |
+++ b/chrome/common/extensions/docs/server2/cron_servlet.py |
@@ -46,6 +46,9 @@ class CronServlet(Servlet): |
def CreateHostFileSystemForBranchAndRevision(self, branch, revision): |
return SubversionFileSystem.Create(branch, revision=revision) |
+ def CreateFileSystemForBranch(self, branch): |
+ return SubversionFileSystem.Create(branch) |
not at google - send to devlin
2013/07/03 19:54:56
maybe we should just rename CreateHostFIleSystemFo
epeterson
2013/07/09 20:51:18
The cron_servlet_test likes to count up how many f
not at google - send to devlin
2013/07/09 23:11:55
ah right. and this does actually break the test? I
|
+ |
def CreateAppSamplesFileSystem(self, object_store_creator): |
# TODO(kalman): CachingFileSystem wrapper for GithubFileSystem, but it's |
# not supported yet (see comment there). |
@@ -231,9 +234,17 @@ class CronServlet(Servlet): |
compiled_host_fs_factory = CompiledFileSystem.Factory( |
host_file_system, |
object_store_creator) |
+ branch_utility = self._delegate.CreateBranchUtility(object_store_creator) |
+ def create_file_system(version): |
+ return CachingFileSystem( |
+ self._delegate.CreateFileSystemForBranch( |
+ branch_utility.GetBranchForVersion(version)), |
+ object_store_creator) |
not at google - send to devlin
2013/07/03 19:54:56
let's introduce a class like HostFileSystemCreator
epeterson
2013/07/09 20:51:18
Done.
|
return ServerInstance(channel, |
object_store_creator, |
host_file_system, |
app_samples_file_system, |
'' if channel == 'stable' else '/%s' % channel, |
- compiled_host_fs_factory) |
+ compiled_host_fs_factory, |
+ branch_utility, |
+ create_file_system) |