| 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(
|
|
|