~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/ui/__init__.py

  • Committer: Martin Pool
  • Date: 2007-04-01 06:19:16 UTC
  • mfrom: (2323.5.20 0.15-integration)
  • mto: This revision was merged to the branch mainline in revision 2390.
  • Revision ID: mbp@sourcefrog.net-20070401061916-plpgsxdf8g7gll9o
Merge 0.15 final release back to trunk, including: recommend upgrades of old workingtrees, handle multiple http redirections, some dirstate fixes, 

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"""