maintenance: added svn verify command to tasks to be able to verify

the filesystem and repo formats.
This commit is contained in:
Marcin Kuzminski 2017-05-26 13:02:12 +02:00
parent 6ad32c57ea
commit d0e3f7b137
2 changed files with 16 additions and 1 deletions

View file

@ -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):

View file

@ -158,6 +158,12 @@ class SubversionRepository(base.BaseRepository):
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