Switch to side-by-side view
--- a/Allura/allura/lib/utils.py +++ b/Allura/allura/lib/utils.py @@ -25,6 +25,7 @@ from ew import jinja2_ew as ew from ming.utils import LazyProperty +import pysvn def permanent_redirect(url): try: @@ -428,3 +429,12 @@ spaces = re.compile(r'^\s*$') stats['data_line_count'] = sum([1 for l in lines if not spaces.match(l)]) return stats + +def check_svn_repo(path): + svn = pysvn.Client() + try: + svn.info2(path) + return True + except pysvn.ClientError, e: + return False +