comparison mercurial/debugcommands.py @ 32305:ccef71de7d41

caches: introduce a 'debugupdatecaches' command That command make sure caches are updated. This is based on 'localrepo.updatecaches' so when we move support for new cache in that function this command will benefit from it.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Tue, 02 May 2017 21:35:06 +0200
parents 9bc36198338e
children 67026d65a4fc
comparison
equal deleted inserted replaced
32304:a72caf0af38e 32305:ccef71de7d41
2128 mapfile, buffered=False) 2128 mapfile, buffered=False)
2129 for r in revs: 2129 for r in revs:
2130 displayer.show(repo[r], **props) 2130 displayer.show(repo[r], **props)
2131 displayer.close() 2131 displayer.close()
2132 2132
2133 @command('debugupdatecaches', [])
2134 def debugupdatecaches(ui, repo, *pats, **opts):
2135 """warm all known caches in the repository"""
2136 with repo.wlock():
2137 with repo.lock():
2138 repo.updatecaches()
2139
2133 @command('debugupgraderepo', [ 2140 @command('debugupgraderepo', [
2134 ('o', 'optimize', [], _('extra optimization to perform'), _('NAME')), 2141 ('o', 'optimize', [], _('extra optimization to perform'), _('NAME')),
2135 ('', 'run', False, _('performs an upgrade')), 2142 ('', 'run', False, _('performs an upgrade')),
2136 ]) 2143 ])
2137 def debugupgraderepo(ui, repo, run=False, optimize=None): 2144 def debugupgraderepo(ui, repo, run=False, optimize=None):