##// END OF EJS Templates
maintainance: run rebuildfncache for Mercurial.
marcink -
r4214:9425ab17 stable
parent child Browse files
Show More
@@ -148,6 +148,15 b' class HGUpdateCaches(MaintenanceTask):'
148 return res
148 return res
149
149
150
150
151 class HGRebuildFnCaches(MaintenanceTask):
152 human_name = 'HG rebuild fn caches'
153
154 def run(self):
155 instance = self.db_repo.scm_instance()
156 res = instance.hg_rebuild_fn_cache()
157 return res
158
159
151 class SVNVerify(MaintenanceTask):
160 class SVNVerify(MaintenanceTask):
152 human_name = 'SVN Verify repo'
161 human_name = 'SVN Verify repo'
153
162
@@ -162,7 +171,7 b' class RepoMaintenance(object):'
162 Performs maintenance of repository based on it's type
171 Performs maintenance of repository based on it's type
163 """
172 """
164 tasks = {
173 tasks = {
165 'hg': [HGVerify, HGUpdateCaches],
174 'hg': [HGVerify, HGUpdateCaches, HGRebuildFnCaches],
166 'git': [GitFSCK, GitGC, GitRepack],
175 'git': [GitFSCK, GitGC, GitRepack],
167 'svn': [SVNVerify],
176 'svn': [SVNVerify],
168 }
177 }
@@ -290,6 +290,12 b' class MercurialRepository(BaseRepository'
290 self._remote.invalidate_vcs_cache()
290 self._remote.invalidate_vcs_cache()
291 return update_cache
291 return update_cache
292
292
293 def hg_rebuild_fn_cache(self):
294 update_cache = self._remote.hg_rebuild_fn_cache()
295
296 self._remote.invalidate_vcs_cache()
297 return update_cache
298
293 def get_common_ancestor(self, commit_id1, commit_id2, repo2):
299 def get_common_ancestor(self, commit_id1, commit_id2, repo2):
294 if commit_id1 == commit_id2:
300 if commit_id1 == commit_id2:
295 return commit_id1
301 return commit_id1
General Comments 0
You need to be logged in to leave comments. Login now