[PATCH] ignore ending a progress if no progress was started

Benoit Boissinot benoit.boissinot at ens-lyon.org
Sat Feb 13 04:16:57 CST 2010


On Sat, Feb 13, 2010 at 09:55:51AM +0100, Ronny Pfannschmidt wrote:
> # HG changeset patch
> # User Ronny Pfannschmidt <Ronny.Pfannschmidt at gmx.de>
> # Date 1266051328 -3600
> # Node ID b507f7253c851cf9d3863059af78e2d201e75516
> # Parent  956498af9812f5d4e81d6e8f44d62c3d3c556b1f
> ignore ending a progress if no progress was started

When can that happen? Should we print a warning if it happens?

regards,

Benoit
> 
> diff --git a/hgext/progress.py b/hgext/progress.py
> --- a/hgext/progress.py
> +++ b/hgext/progress.py
> @@ -146,7 +146,7 @@ class progbar(object):
>  
>      def progress(self, orig, topic, pos, item='', unit='', total=None):
>          now = time.time()
> -        if pos is None and self.topics[-1] == topic and self.printed:
> +        if pos is None and self.topics and self.topics[-1] == topic and self.printed:
>              if self.ui.configbool('progress', 'clear-complete', default=True):
>                  self.clear()
>              else:
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel

-- 
:wq


More information about the Mercurial-devel mailing list