##// END OF EJS Templates
debug: allow specifying a manifest node rather than a revision
Martijn Pieters -
r38802:ddb15a83 default
parent child Browse files
Show More
@@ -791,15 +791,21 b' def perfphases(ui, repo, **opts):'
791 791 timer(d)
792 792 fm.end()
793 793
794 @command('perfmanifest', [], 'REV')
795 def perfmanifest(ui, repo, rev, **opts):
794 @command('perfmanifest',[
795 ('m', 'manifest-rev', False, 'Look up a manifest node revision'),
796 ('', 'clear-disk', False, 'clear on-disk caches too'),
797 ], 'REV|NODE')
798 def perfmanifest(ui, repo, rev, manifest_rev=False, clear_disk=False, **opts):
796 799 """benchmark the time to read a manifest from disk and return a usable
797 800 dict-like object
798 801
799 802 Manifest caches are cleared before retrieval."""
800 803 timer, fm = gettimer(ui, opts)
804 if not manifest_rev:
801 805 ctx = scmutil.revsingle(repo, rev, rev)
802 806 t = ctx.manifestnode()
807 else:
808 t = repo.manifestlog._revlog.lookup(rev)
803 809 def d():
804 810 repo.manifestlog.clearcaches()
805 811 repo.manifestlog[t].read()
General Comments 0
You need to be logged in to leave comments. Login now