Comments
Patch
@@ -530,7 +530,10 @@ def perfheads(ui, repo, **opts):
timer(d)
fm.end()
-@command(b'perftags', formatteropts)
+@command(b'perftags', formatteropts+
+ [
+ (b'', b'clear-revlogs', True, 'refresh changelog and manifest'),
+ ])
def perftags(ui, repo, **opts):
import mercurial.changelog
import mercurial.manifest
@@ -539,11 +542,13 @@ def perftags(ui, repo, **opts):
timer, fm = gettimer(ui, opts)
svfs = getsvfs(repo)
repocleartagscache = repocleartagscachefunc(repo)
+ clearrevlogs = opts['clear_revlogs']
def s():
- repo.changelog = mercurial.changelog.changelog(svfs)
- rootmanifest = mercurial.manifest.manifestrevlog(svfs)
- repo.manifestlog = mercurial.manifest.manifestlog(svfs, repo,
- rootmanifest)
+ if clearrevlogs:
+ repo.changelog = mercurial.changelog.changelog(svfs)
+ rootmanifest = mercurial.manifest.manifestrevlog(svfs)
+ repo.manifestlog = mercurial.manifest.manifestlog(svfs, repo,
+ rootmanifest)
repocleartagscache()
def t():
return len(repo.tags())