equal
deleted
inserted
replaced
51 def perfstatus(ui, repo, **opts): |
51 def perfstatus(ui, repo, **opts): |
52 #m = match.always(repo.root, repo.getcwd()) |
52 #m = match.always(repo.root, repo.getcwd()) |
53 #timer(lambda: sum(map(len, repo.dirstate.status(m, [], False, False, |
53 #timer(lambda: sum(map(len, repo.dirstate.status(m, [], False, False, |
54 # False)))) |
54 # False)))) |
55 timer(lambda: sum(map(len, repo.status(**opts)))) |
55 timer(lambda: sum(map(len, repo.status(**opts)))) |
|
56 |
|
57 @command('perfaddremove') |
|
58 def perfaddremove(ui, repo): |
|
59 try: |
|
60 oldquiet = repo.ui.quiet |
|
61 repo.ui.quiet = True |
|
62 timer(lambda: scmutil.addremove(repo, dry_run=True)) |
|
63 finally: |
|
64 repo.ui.quiet = oldquiet |
56 |
65 |
57 def clearcaches(cl): |
66 def clearcaches(cl): |
58 # behave somewhat consistently across internal API changes |
67 # behave somewhat consistently across internal API changes |
59 if util.safehasattr(cl, 'clearcaches'): |
68 if util.safehasattr(cl, 'clearcaches'): |
60 cl.clearcaches() |
69 cl.clearcaches() |