[MERGE REVIEW] Progress bars interact nicely with warning/note

Martin Pool mbp at sourcefrog.net
Sun Mar 12 15:38:00 GMT 2006


On 11 Mar 2006, Aaron Bentley <aaron.bentley at utoronto.ca> wrote:
> David Allouche noticed this oddity in the diff output:
> 
> @@ -92,6 +92,12 @@
> ~     def top(self):
> ~         if len(self._stack) != 0:
> ~             return self._stack[-1]
> +        else:
> +            return None
> +
> +    def bottom(self):
> +        if len(self._stack) != 0:
> +            return self._stack[0]
> ~         else:
> ~             return None
> 
> He wondered whether another diff algorithm would do better.  It turns
> out Patience diff does behave better here:
> 
> @@ -95,6 +95,12 @@
> ~         else:
> ~             return None
> 
> +    def bottom(self):
> +        if len(self._stack) != 0:
> +            return self._stack[0]
> +        else:
> +            return None
> +
> ~     def get_nested(self):
> ~         """Return a nested progress bar."""
> ~         if len(self._stack) == 0:

Right, that certainly is better.

-- 
Martin




More information about the bazaar mailing list