On Wed, 24 Aug 2016 17:31:19 +0000, timeless wrote:
> # HG changeset patch
> # User timeless <timel...@mozdev.org>
> # Date 1472058857 0
> #      Wed Aug 24 17:14:17 2016 +0000
> # Node ID d0ec531c3307561e18bb76b7178371e1ababcf5d
> # Parent  7b0afc5eacdc0662ed0fcde8eb58c8e599a7f695
> # Available At https://bitbucket.org/timeless/mercurial-crew
> #              hg pull https://bitbucket.org/timeless/mercurial-crew -r 
> d0ec531c3307
> histedit: report planning progress from initialization
> 
> This hasn't actually shown up as slow, but it could...

I don't think parsing rule lines is slow enough to show progress.

> diff -r 7b0afc5eacdc -r d0ec531c3307 hgext/histedit.py
> --- a/hgext/histedit.py       Wed Aug 24 17:13:48 2016 +0000
> +++ b/hgext/histedit.py       Wed Aug 24 17:14:17 2016 +0000
> @@ -347,29 +347,36 @@
>  
>          keep = lines[index] == 'True'
>          index += 1
> +        ui = self.repo.ui
>  
>          # Rules
>          rules = []
>          rulelen = int(lines[index])
>          index += 1
>          for i in xrange(rulelen):
> +            ui.progress(_("planning"), i, 'task',
> +                        _('changes'), rulelen)
>              ruleaction = lines[index]
>              index += 1
>              rule = lines[index]
>              index += 1
>              rules.append((ruleaction, rule))

Looks like two lines per rule. pos and total would be doubled.
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to