~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: 2007-04-01 06:48:38 UTC
  • mfrom: (2389.1.1 0.15-to-trunk)
  • Revision ID: pqm@pqm.ubuntu.com-20070401064838-34903c7b0d0c8007
merge 0.15 back to dev

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
36
36
 
37
37
from bzrlib import (
38
38
    progress,
 
39
    trace,
39
40
    )
40
41
""")
41
42
 
97
98
        """
98
99
        raise NotImplementedError(self.get_boolean)
99
100
 
 
101
    def recommend_upgrade(self,
 
102
        current_format_name,
 
103
        basedir):
 
104
        # this should perhaps be in the TextUIFactory and the default can do
 
105
        # nothing
 
106
        trace.warning("%s is deprecated "
 
107
            "and a better format is available.\n"
 
108
            "It is recommended that you upgrade by "
 
109
            "running the command\n"
 
110
            "  bzr upgrade %s",
 
111
            current_format_name,
 
112
            basedir)
100
113
 
 
114
            
101
115
class CLIUIFactory(UIFactory):
102
116
    """Common behaviour for command line UI factories."""
103
117
 
162
176
    def clear_term(self):
163
177
        pass
164
178
 
 
179
    def recommend_upgrade(self, *args):
 
180
        pass
 
181
 
165
182
 
166
183
def clear_decorator(func, *args, **kwargs):
167
184
    """Decorator that clears the term"""