# HG changeset patch # User Marcin Kuzminski # Date 2017-05-26 11:00:37 # Node ID d590b7cac5ad308a748c3d3142001d5fbe2b4fe2 # Parent ee6ce43671f9a2f10d04038609418994628840a5 svn: implemented svn verify function. - allows to check SVN version compatability. diff --git a/vcsserver/svn.py b/vcsserver/svn.py --- a/vcsserver/svn.py +++ b/vcsserver/svn.py @@ -146,6 +146,18 @@ class SvnRemote(object): return False return True + @reraise_safe_exceptions + def verify(self, wire,): + repo_path = wire['path'] + if not self.is_path_valid_repository(wire, repo_path): + raise Exception( + "Path %s is not a valid Subversion repository." % repo_path) + + load = subprocess.Popen( + ['svnadmin', 'info', repo_path], + stdout=subprocess.PIPE, stderr=subprocess.PIPE) + return ''.join(load.stdout) + def lookup(self, wire, revision): if revision not in [-1, None, 'HEAD']: raise NotImplementedError