~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/ui/__init__.py

Merge 2.0 into 2.1 including fixes for #262450, #373898, #498409

Show diffs side-by-side

added added

removed removed

Lines of Context:
195
195
        if not self._task_stack:
196
196
            warnings.warn("%r finished but nothing is active"
197
197
                % (task,))
198
 
        if task in self._task_stack:
199
 
            self._task_stack.remove(task)
 
198
        elif task != self._task_stack[-1]:
 
199
            warnings.warn("%r is not the active task %r"
 
200
                % (task, self._task_stack[-1]))
200
201
        else:
201
 
            warnings.warn("%r is not in active stack %r"
202
 
                % (task, self._task_stack))
 
202
            del self._task_stack[-1]
203
203
        if not self._task_stack:
204
204
            self._progress_all_finished()
205
205
 
344
344
        self.show_user_warning('cross_format_fetch', from_format=from_format,
345
345
            to_format=to_format)
346
346
 
347
 
    def warn_experimental_format_fetch(self, inter):
348
 
        """Warn about fetching into experimental repository formats."""
349
 
        if inter.target._format.experimental:
350
 
            trace.warning("Fetching into experimental format %s.\n"
351
 
                "This format may be unreliable or change in the future "
352
 
                "without an upgrade path.\n" % (inter.target._format,))
353
 
 
354
 
 
355
347
 
356
348
class SilentUIFactory(UIFactory):
357
349
    """A UI Factory which never prints anything.