[PATCH 1 of 2 evolve-ext] evolve: ui.progress doesn't use total count if pos is None, let's drop it

Anton Shestakov av6 at dwimlabs.net
Mon Mar 14 09:12:30 EDT 2016


On Mon, 14 Mar 2016 13:07:05 +0000
Pierre-Yves David <pierre-yves.david at ens-lyon.org> wrote:

> On 03/14/2016 01:05 PM, Anton Shestakov wrote:
> > # HG changeset patch
> > # User Anton Shestakov <av6 at dwimlabs.net>
> > # Date 1457761525 -28800
> > #      Sat Mar 12 13:45:25 2016 +0800
> > # Node ID d6da1b74e4520055e39765fb74ae8ae2090a3ed0
> > # Parent  97d98b8d9068baa9d072c1a5660818219e86516d
> > evolve: ui.progress doesn't use total count if pos is None, let's
> > drop it  
> 
> I'm not sure what this is about.

Every other call of ui.progress that has argument #2 (named `pos`) set
to None doesn't specify `total`, because it won't be used. Basically,
ui.progress(action, None) is enough, when used like this it hides
progress bar because the action is considered completed. So this is just
a minor cleanup patch.

> > -    ui.progress(_("comparing with other"), None, total=totalnb)
> > +    ui.progress(_("comparing with other"), None)


More information about the Mercurial-devel mailing list