perf.perflog: add option to follow renames
authorAlexander Solovyov <piranha@piranha.org.ua>
Wed, 25 Nov 2009 00:02:02 +0200
changeset 9932 2fcbef9a349a
parent 9930 a9cab6c49d61
child 9933 2e7902158af9
perf.perflog: add option to follow renames
contrib/perf.py
--- 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, []),
 }