diff --git a/.hgtags b/.hgtags --- a/.hgtags +++ b/.hgtags @@ -19,3 +19,4 @@ de00a831a0709ffaac57f948738ea927b97223a9 57f527e0646d731768fb5e0fe742b12a35bdc63b v4.7.1 f9b09787da9845e4a105f4bffdc252099902cefb v4.7.2 0b7c790b726f08385e6ebdf4f257c905787b9244 v4.8.0 +f4123e725b74d0e82fe89982ab8791a66062e2b3 v4.9.0 diff --git a/vcsserver/svn.py b/vcsserver/svn.py --- a/vcsserver/svn.py +++ b/vcsserver/svn.py @@ -17,6 +17,7 @@ from __future__ import absolute_import +import os from urllib2 import URLError import logging import posixpath as vcspath @@ -89,6 +90,8 @@ class SubversionFactory(RepoFactory): repo = svn.repos.create(path, "", "", None, fs_config) else: repo = svn.repos.open(path) + + log.debug('Got SVN object: %s', repo) return repo def repo(self, wire, create=False, compatible_version=None): @@ -138,6 +141,14 @@ class SvnRemote(object): return True def is_path_valid_repository(self, wire, path): + + # NOTE(marcink): short circuit the check for SVN repo + # the repos.open might be expensive to check, but we have one cheap + # pre condition that we can use, to check for 'format' file + + if not os.path.isfile(os.path.join(path, 'format')): + return False + try: svn.repos.open(path) except svn.core.SubversionException: