Show More
@@ -139,6 +139,15 b' class HGVerify(MaintenanceTask):' | |||||
139 | return res |
|
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 | class SVNVerify(MaintenanceTask): |
|
151 | class SVNVerify(MaintenanceTask): | |
143 | human_name = 'SVN Verify repo' |
|
152 | human_name = 'SVN Verify repo' | |
144 |
|
153 | |||
@@ -153,7 +162,7 b' class RepoMaintenance(object):' | |||||
153 | Performs maintenance of repository based on it's type |
|
162 | Performs maintenance of repository based on it's type | |
154 | """ |
|
163 | """ | |
155 | tasks = { |
|
164 | tasks = { | |
156 | 'hg': [HGVerify], |
|
165 | 'hg': [HGVerify, HGUpdateCaches], | |
157 | 'git': [GitFSCK, GitGC, GitRepack], |
|
166 | 'git': [GitFSCK, GitGC, GitRepack], | |
158 | 'svn': [SVNVerify], |
|
167 | 'svn': [SVNVerify], | |
159 | } |
|
168 | } |
@@ -284,6 +284,12 b' class MercurialRepository(BaseRepository' | |||||
284 | self._remote.invalidate_vcs_cache() |
|
284 | self._remote.invalidate_vcs_cache() | |
285 | return verify |
|
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 | def get_common_ancestor(self, commit_id1, commit_id2, repo2): |
|
293 | def get_common_ancestor(self, commit_id1, commit_id2, repo2): | |
288 | if commit_id1 == commit_id2: |
|
294 | if commit_id1 == commit_id2: | |
289 | return commit_id1 |
|
295 | return commit_id1 |
General Comments 0
You need to be logged in to leave comments.
Login now