~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/ui/__init__.py

  • Committer: Martin Pool
  • Date: 2007-03-23 01:41:37 UTC
  • mto: (2323.5.2 0.15)
  • mto: This revision was merged to the branch mainline in revision 2390.
  • Revision ID: mbp@sourcefrog.net-20070323014137-7rvpygb42i2tyrfc
BzrDir._check_supported now also takes care of recommending upgrades, which
should be less disruptive to other workingtree formats.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2006 Canonical Ltd
 
1
# Copyright (C) 2005, 2006, 2007 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
101
101
    def recommend_upgrade(self,
102
102
        current_format_name,
103
103
        basedir):
 
104
        # this should perhaps be in the TextUIFactory and the default can do
 
105
        # nothing
104
106
        trace.warning("%s is deprecated "
105
107
            "and a better format is available.\n"
106
108
            "It is recommended that you upgrade by "
108
110
            "  bzr upgrade %s",
109
111
            current_format_name,
110
112
            basedir)
 
113
 
111
114
            
112
115
class CLIUIFactory(UIFactory):
113
116
    """Common behaviour for command line UI factories."""
173
176
    def clear_term(self):
174
177
        pass
175
178
 
 
179
    def recommend_upgrade(self, *args):
 
180
        pass
 
181
 
176
182
 
177
183
def clear_decorator(func, *args, **kwargs):
178
184
    """Decorator that clears the term"""