Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3571)

Unified Diff: chrome/common/extensions/docs/server2/handler.py

Issue 10828235: Extensions Docs Server: Efficient MemcacheFileSystem (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tests! Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/docs/server2/handler.py
diff --git a/chrome/common/extensions/docs/server2/handler.py b/chrome/common/extensions/docs/server2/handler.py
index 4f4f9de7e68122109841c36d7d2bf25b61913b0f..5065f66324a8da89f90d90185bd1b003a450809d 100644
--- a/chrome/common/extensions/docs/server2/handler.py
+++ b/chrome/common/extensions/docs/server2/handler.py
@@ -32,6 +32,7 @@ from appengine_url_fetcher import AppEngineUrlFetcher
DEFAULT_BRANCH = 'local'
SVN_URL = 'http://src.chromium.org/chrome'
+VIEWVC_URL = 'http://src.chromium.org/viewvc/chrome'
TRUNK_URL = SVN_URL + '/trunk'
BRANCH_URL = SVN_URL + '/branches'
@@ -62,10 +63,12 @@ def _GetInstanceForBranch(branch, local_path):
if branch == 'local':
file_system = LocalFileSystem(local_path)
else:
- fetcher = AppEngineUrlFetcher(
- _GetURLFromBranch(branch) + '/' + EXTENSIONS_PATH)
- file_system = MemcacheFileSystem(SubversionFileSystem(fetcher),
- AppEngineMemcache(branch))
+ svn_url = _GetURLFromBranch(branch) + '/' + EXTENSIONS_PATH
+ stat_fetcher = AppEngineUrlFetcher(svn_url.replace(SVN_URL, VIEWVC_URL))
+ fetcher = AppEngineUrlFetcher(svn_url)
+ file_system = MemcacheFileSystem(
+ SubversionFileSystem(fetcher, stat_fetcher),
+ AppEngineMemcache(branch))
cache_builder = FileSystemCache.Builder(file_system)
api_list_data_source = APIListDataSource(cache_builder,

Powered by Google App Engine
This is Rietveld 408576698