~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/ui/__init__.py

  • Committer: Martin Pool
  • Date: 2010-01-15 07:00:49 UTC
  • mfrom: (4634.119.8 2.0)
  • mto: This revision was merged to the branch mainline in revision 4966.
  • Revision ID: mbp@sourcefrog.net-20100115070049-0cb4bi4lsrul2szs
Merge warning about cross-format fetch from 2.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
263
263
        """Show an error message (not an exception) to the user.
264
264
        
265
265
        The message should not have an error prefix or trailing newline.  That
266
 
        will be added by the factory if appropriate. 
 
266
        will be added by the factory if appropriate.
267
267
        """
268
268
        raise NotImplementedError(self.show_error)
269
269
 
275
275
        """Show a warning to the user."""
276
276
        raise NotImplementedError(self.show_warning)
277
277
 
 
278
    def warn_cross_format_fetch(self, from_format, to_format):
 
279
        """Warn about a potentially slow cross-format transfer"""
 
280
        # See <https://launchpad.net/bugs/456077> asking for a warning here
 
281
        trace.warning("Doing on-the-fly conversion from %s to %s.\n"
 
282
            "This may take some time. Upgrade the repositories to the "
 
283
            "same format for better performance.\n" %
 
284
            (from_format, to_format))
278
285
 
279
286
 
280
287
class SilentUIFactory(UIFactory):