~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/ui/__init__.py

  • Committer: Martin Pool
  • Date: 2010-02-25 06:17:27 UTC
  • mfrom: (5055 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5057.
  • Revision ID: mbp@sourcefrog.net-20100225061727-4sd9lt0qmdc6087t
merge news

Show diffs side-by-side

added added

removed removed

Lines of Context:
183
183
        if not self._task_stack:
184
184
            warnings.warn("%r finished but nothing is active"
185
185
                % (task,))
186
 
        elif task != self._task_stack[-1]:
187
 
            warnings.warn("%r is not the active task %r"
188
 
                % (task, self._task_stack[-1]))
 
186
        if task in self._task_stack:
 
187
            self._task_stack.remove(task)
189
188
        else:
190
 
            del self._task_stack[-1]
 
189
            warnings.warn("%r is not in active stack %r"
 
190
                % (task, self._task_stack))
191
191
        if not self._task_stack:
192
192
            self._progress_all_finished()
193
193
 
295
295
            "same format for better performance.\n" %
296
296
            (from_format, to_format))
297
297
 
 
298
    def warn_experimental_format_fetch(self, inter):
 
299
        """Warn about fetching into experimental repository formats."""
 
300
        if inter.target._format.experimental:
 
301
            trace.warning("Fetching into experimental format %s.\n"
 
302
                "This format may be unreliable or change in the future "
 
303
                "without an upgrade path.\n" % (inter.target._format,))
 
304
 
 
305
 
298
306
 
299
307
class SilentUIFactory(UIFactory):
300
308
    """A UI Factory which never prints anything.