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

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

Issue 68873003: Docserver: Serve docs out of src/ not src/chrome/common/extensions. This allows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix samples Created 7 years, 1 month 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/subversion_file_system.py
diff --git a/chrome/common/extensions/docs/server2/subversion_file_system.py b/chrome/common/extensions/docs/server2/subversion_file_system.py
index a63d5d82daf97287c5509e0dcf5ff687d00adec0..16e4f5b3290b5aee699f6ab5acbce1e784c59801 100644
--- a/chrome/common/extensions/docs/server2/subversion_file_system.py
+++ b/chrome/common/extensions/docs/server2/subversion_file_system.py
@@ -13,9 +13,9 @@ from docs_server_utils import StringIdentity
from file_system import (
FileNotFoundError, FileSystem, FileSystemError, StatInfo, ToUnicode)
from future import Future
-import svn_constants
import url_constants
+
def _ParseHTML(html):
'''Unfortunately, the viewvc page has a stray </div> tag, so this takes care
of all mismatched tags.
@@ -144,9 +144,9 @@ class SubversionFileSystem(FileSystem):
@staticmethod
def Create(branch='trunk', revision=None):
if branch == 'trunk':
- svn_path = 'trunk/src/%s' % svn_constants.EXTENSIONS_PATH
+ svn_path = 'trunk/src'
else:
- svn_path = 'branches/%s/src/%s' % (branch, svn_constants.EXTENSIONS_PATH)
+ svn_path = 'branches/%s/src' % branch
return SubversionFileSystem(
AppEngineUrlFetcher('%s/%s' % (url_constants.SVN_URL, svn_path)),
AppEngineUrlFetcher('%s/%s' % (url_constants.VIEWVC_URL, svn_path)),
@@ -174,7 +174,6 @@ class SubversionFileSystem(FileSystem):
def Stat(self, path):
directory, filename = posixpath.split(path)
- directory += '/'
if self._revision is not None:
# |stat_fetch| uses viewvc which uses pathrev= for version.
directory += '?pathrev=%s' % self._revision
@@ -195,7 +194,7 @@ class SubversionFileSystem(FileSystem):
stat_info = _CreateStatInfo(result.content)
if stat_info.version is None:
raise FileSystemError('Failed to find version of dir %s' % directory)
- if path.endswith('/'):
+ if path == '' or path.endswith('/'):
return stat_info
if filename not in stat_info.child_versions:
raise FileNotFoundError(

Powered by Google App Engine
This is Rietveld 408576698