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

Side by Side Diff: chrome/common/extensions/docs/server2/subversion_file_system.py

Issue 10704252: Extensions Docs Server: Internal file system (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tests Created 8 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 import re
6
7 from async_fetch_value import AsyncFetchValue
8 from file_system import FileSystem
9 from lazy_value import LazyValue
10
11 class SubversionFileSystem(FileSystem):
not at google - send to devlin 2012/07/18 10:39:16 sweeet
12 """Class to fetch resources from src.chromium.org.
13 """
14 def __init__(self, fetcher):
15 self._fetcher = fetcher
16
17 def Read(self, paths):
18 return LazyValue(delegate=AsyncFetchValue(paths, self._fetcher))
19
20 def Stat(self, path):
21 dir_html = self._fetcher.fetch(path).content
22 return self.StatInfo(int(re.search('([0-9]+)', dir_html).group(0)))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698