diff --git a/rhodecode/lib/repo_maintenance.py b/rhodecode/lib/repo_maintenance.py --- a/rhodecode/lib/repo_maintenance.py +++ b/rhodecode/lib/repo_maintenance.py @@ -83,6 +83,15 @@ class HGVerify(MaintenanceTask): return res +class SVNVerify(MaintenanceTask): + human_name = 'SVN Verify repo' + + def run(self): + instance = self.db_repo.scm_instance() + res = instance.verify() + return res + + class RepoMaintenance(object): """ Performs maintenance of repository based on it's type @@ -90,7 +99,7 @@ class RepoMaintenance(object): tasks = { 'hg': [HGVerify], 'git': [GitGC], - 'svn': [], + 'svn': [SVNVerify], } def get_tasks_for_repo(self, db_repo): diff --git a/rhodecode/lib/vcs/backends/svn/repository.py b/rhodecode/lib/vcs/backends/svn/repository.py --- a/rhodecode/lib/vcs/backends/svn/repository.py +++ b/rhodecode/lib/vcs/backends/svn/repository.py @@ -158,6 +158,12 @@ class SubversionRepository(base.BaseRepo return commit_id1 return commit_id2 + def verify(self): + verify = self._remote.verify() + + self._remote.invalidate_vcs_cache() + return verify + def compare(self, commit_id1, commit_id2, repo2, merge, pre_load=None): # TODO: johbo: Implement better comparison, this is a very naive # version which does not allow to compare branches, tags or folders