##// END OF EJS Templates
maintainance: added update caches to mercurial.
marcink -
r3928:739550ba default
parent child Browse files
Show More
@@ -139,6 +139,15 b' class HGVerify(MaintenanceTask):'
139 139 return res
140 140
141 141
142 class HGUpdateCaches(MaintenanceTask):
143 human_name = 'HG update caches'
144
145 def run(self):
146 instance = self.db_repo.scm_instance()
147 res = instance.hg_update_cache()
148 return res
149
150
142 151 class SVNVerify(MaintenanceTask):
143 152 human_name = 'SVN Verify repo'
144 153
@@ -153,7 +162,7 b' class RepoMaintenance(object):'
153 162 Performs maintenance of repository based on it's type
154 163 """
155 164 tasks = {
156 'hg': [HGVerify],
165 'hg': [HGVerify, HGUpdateCaches],
157 166 'git': [GitFSCK, GitGC, GitRepack],
158 167 'svn': [SVNVerify],
159 168 }
@@ -284,6 +284,12 b' class MercurialRepository(BaseRepository'
284 284 self._remote.invalidate_vcs_cache()
285 285 return verify
286 286
287 def hg_update_cache(self):
288 update_cache = self._remote.hg_update_cache()
289
290 self._remote.invalidate_vcs_cache()
291 return update_cache
292
287 293 def get_common_ancestor(self, commit_id1, commit_id2, repo2):
288 294 if commit_id1 == commit_id2:
289 295 return commit_id1
General Comments 0
You need to be logged in to leave comments. Login now