equal
deleted
inserted
replaced
848 By default, we read every ``-d/--dist`` revision from 0 to tip of |
848 By default, we read every ``-d/--dist`` revision from 0 to tip of |
849 the specified revlog. |
849 the specified revlog. |
850 |
850 |
851 The start revision can be defined via ``-s/--startrev``. |
851 The start revision can be defined via ``-s/--startrev``. |
852 """ |
852 """ |
853 _len = getlen(ui) |
853 rl = cmdutil.openrevlog(repo, 'perfrevlog', file_, opts) |
854 |
854 rllen = getlen(ui)(rl) |
855 def d(): |
855 |
856 r = cmdutil.openrevlog(repo, 'perfrevlog', file_, opts) |
856 def d(): |
857 r.clearcaches() |
857 rl.clearcaches() |
858 |
858 |
859 beginrev = startrev |
859 beginrev = startrev |
860 endrev = _len(r) |
860 endrev = rllen |
861 dist = opts['dist'] |
861 dist = opts['dist'] |
862 |
862 |
863 if reverse: |
863 if reverse: |
864 beginrev, endrev = endrev, beginrev |
864 beginrev, endrev = endrev, beginrev |
865 dist = -1 * dist |
865 dist = -1 * dist |
866 |
866 |
867 for x in xrange(beginrev, endrev, dist): |
867 for x in xrange(beginrev, endrev, dist): |
868 r.revision(x) |
868 rl.revision(x) |
869 |
869 |
870 timer, fm = gettimer(ui, opts) |
870 timer, fm = gettimer(ui, opts) |
871 timer(d) |
871 timer(d) |
872 fm.end() |
872 fm.end() |
873 |
873 |