~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/ui/__init__.py

  • Committer: Robert Collins
  • Date: 2010-04-08 04:34:03 UTC
  • mfrom: (5138 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5139.
  • Revision ID: robertc@robertcollins.net-20100408043403-56z0d07vdqrx7f3t
Update bugfix for 528114 to trunk.

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
 
        elif task != self._task_stack[-1]:
199
 
            warnings.warn("%r is not the active task %r"
200
 
                % (task, self._task_stack[-1]))
 
198
        if task in self._task_stack:
 
199
            self._task_stack.remove(task)
201
200
        else:
202
 
            del self._task_stack[-1]
 
201
            warnings.warn("%r is not in active stack %r"
 
202
                % (task, self._task_stack))
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
 
347
355
 
348
356
class SilentUIFactory(UIFactory):
349
357
    """A UI Factory which never prints anything.