changeset 9932:2fcbef9a349a

perf.perflog: add option to follow renames
author Alexander Solovyov <piranha@piranha.org.ua>
date Wed, 25 Nov 2009 00:02:02 +0200
parents a9cab6c49d61
children 2e7902158af9
files contrib/perf.py
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/perf.py	Tue Nov 24 14:45:29 2009 -0800
+++ b/contrib/perf.py	Wed Nov 25 00:02:02 2009 +0200
@@ -103,9 +103,10 @@
 def perflookup(ui, repo, rev):
     timer(lambda: len(repo.lookup(rev)))
 
-def perflog(ui, repo):
+def perflog(ui, repo, **opts):
     ui.pushbuffer()
-    timer(lambda: commands.log(ui, repo, rev=[], date='', user=''))
+    timer(lambda: commands.log(ui, repo, rev=[], date='', user='',
+                               copies=opts.get('rename')))
     ui.popbuffer()
 
 def perftemplating(ui, repo):
@@ -144,7 +145,8 @@
     'perftags': (perftags, []),
     'perfdirstate': (perfdirstate, []),
     'perfdirstatedirs': (perfdirstate, []),
-    'perflog': (perflog, []),
+    'perflog': (perflog,
+                [('', 'rename', False, 'ask log to follow renames')]),
     'perftemplating': (perftemplating, []),
     'perfdiffwd': (perfdiffwd, []),
 }