~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/ui/__init__.py

  • Committer: Jelmer Vernooij
  • Date: 2011-08-02 11:18:43 UTC
  • mto: This revision was merged to the branch mainline in revision 6053.
  • Revision ID: jelmer@samba.org-20110802111843-rv2smesjxmodzpp9
Use show_user_warning rather than custom warning methods on UIFactory.

Show diffs side-by-side

added added

removed removed

Lines of Context:
145
145
            "This may take some time. Upgrade the repositories to the "
146
146
            "same format for better performance."
147
147
            ),
 
148
        experimental_format_fetch=("Fetching into experimental format "
 
149
            "%(to_format)s.\n"
 
150
            "This format may be unreliable or change in the future "
 
151
            "without an upgrade path.\n"),
148
152
        deprecated_command=(
149
153
            "The command 'bzr %(deprecated_name)s' "
150
154
            "has been deprecated in bzr %(deprecated_in_version)s. "
408
412
        """Show a warning to the user."""
409
413
        raise NotImplementedError(self.show_warning)
410
414
 
411
 
    def warn_cross_format_fetch(self, from_format, to_format):
412
 
        """Warn about a potentially slow cross-format transfer.
413
 
        
414
 
        This is deprecated in favor of show_user_warning, but retained for api
415
 
        compatibility in 2.0 and 2.1.
416
 
        """
417
 
        self.show_user_warning('cross_format_fetch', from_format=from_format,
418
 
            to_format=to_format)
419
 
 
420
 
    def warn_experimental_format_fetch(self, inter):
421
 
        """Warn about fetching into experimental repository formats."""
422
 
        if inter.target._format.experimental:
423
 
            trace.warning("Fetching into experimental format %s.\n"
424
 
                "This format may be unreliable or change in the future "
425
 
                "without an upgrade path.\n" % (inter.target._format,))
426
 
 
427
415
 
428
416
class NoninteractiveUIFactory(UIFactory):
429
417
    """Base class for UIs with no user."""