def Create(self, branch='trunk', revision=None, offline=None): '''Creates either SVN file systems or specialized file systems from the constructor passed into this instance. Wraps the resulting file system in an Offline file system if the offline flag is set, and finally wraps it in a Caching file system. ''' if self._constructor_for_test is not None: file_system = self._constructor_for_test(branch=branch, revision=revision) else: file_system = SubversionFileSystem.Create(branch=branch, revision=revision) if offline or (offline is None and self._offline): file_system = OfflineFileSystem(file_system) return CachingFileSystem(file_system, self._object_store_creator)
def _Create(self, branch, revision=None): '''Creates SVN file systems (or if in a test, potentially whatever |self._constructor_for_test specifies). Wraps the resulting file system in an Offline file system if the offline flag is set, and finally wraps it in a Caching file system. ''' if self._constructor_for_test is not None: file_system = self._constructor_for_test(branch=branch, revision=revision) else: file_system = SubversionFileSystem.Create(branch=branch, revision=revision) if self._offline: file_system = OfflineFileSystem(file_system) return CachingFileSystem(file_system, self._object_store_creator)
def CreateHostFileSystemForBranchAndRevision(self, branch, revision): return SubversionFileSystem.Create(branch, revision=revision)