~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/ui/__init__.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-03-22 09:57:11 UTC
  • mfrom: (5724.1.4 jam-integration)
  • Revision ID: pqm@pqm.ubuntu.com-20110322095711-9bggm9tnxnw9frow
(jameinel) Fix tar exporters to always write to binary streams. (John A
 Meinel)

Show diffs side-by-side

added added

removed removed

Lines of Context:
154
154
            "%(from_format)s to %(to_format)s.\n"
155
155
            "This may take some time. Upgrade the repositories to the "
156
156
            "same format for better performance."
157
 
            ),
158
 
        recommend_upgrade=("%(current_format_name)s is deprecated "
159
 
            "and a better format is available.\n"
160
 
            "It is recommended that you upgrade by "
161
 
            "running the command\n"
162
 
            "  bzr upgrade %(basedir)s"),
 
157
            )
163
158
        )
164
159
 
165
160
    def __init__(self):
348
343
        """
349
344
        return NullProgressView()
350
345
 
351
 
    def recommend_upgrade(self, current_format_name, basedir):
352
 
        """Recommend the user upgrade a control directory.
353
 
 
354
 
        :param current_format_name: Description of the current format
355
 
        :param basedir: Location of the control dir
356
 
        """
357
 
        self.show_user_warning('recommend_upgrade',
358
 
            current_format_name=current_format_name, basedir=basedir)
 
346
    def recommend_upgrade(self,
 
347
        current_format_name,
 
348
        basedir):
 
349
        # XXX: this should perhaps be in the TextUIFactory and the default can do
 
350
        # nothing
 
351
        #
 
352
        # XXX: Change to show_user_warning - that will accomplish the previous
 
353
        # xxx. -- mbp 2010-02-25
 
354
        trace.warning("%s is deprecated "
 
355
            "and a better format is available.\n"
 
356
            "It is recommended that you upgrade by "
 
357
            "running the command\n"
 
358
            "  bzr upgrade %s",
 
359
            current_format_name,
 
360
            basedir)
359
361
 
360
362
    def report_transport_activity(self, transport, byte_count, direction):
361
363
        """Called by transports as they do IO.