~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to __init__.py

  • Committer: Aaron Bentley
  • Date: 2007-01-16 22:17:34 UTC
  • Revision ID: abentley@panoramicfeedback.com-20070116221734-ijxdmpekl9swpf4x
Tweak colordiff/shelf changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2006, 2007 Aaron Bentley <aaron.bentley@utoronto.ca>
 
1
# Copyright (C) 2005, 2006 Aaron Bentley <aaron.bentley@utoronto.ca>
2
2
# Copyright (C) 2005, 2006 Canonical Limited.
3
3
# Copyright (C) 2006 Michael Ellerman.
4
4
#
23
23
import bzrlib
24
24
 
25
25
 
26
 
__version__ = '0.15.0'
 
26
__version__ = '0.14.0'
27
27
 
28
28
 
29
29
version_info = tuple(int(n) for n in __version__.split('.'))
47
47
        # get the message out any way we can
48
48
        from warnings import warn as warning
49
49
    if bzrlib_version < desired:
50
 
        warning('Installed Bazzar version %s is too old to be used with'
51
 
                ' plugin \n'
52
 
                '"Bzrtools" %s.' % (bzrlib.__version__, __version__))
 
50
        warning('Installed bzr version %s is too old to be used with bzrtools'
 
51
                ' %s.' % (bzrlib.__version__, __version__))
53
52
        # Not using BzrNewError, because it may not exist.
54
53
        raise Exception, ('Version mismatch', version_info)
55
54
    else:
56
 
        warning('Plugin "Bzrtools" is not up to date with installed Bazaar'
57
 
                ' version %s.\n'
58
 
                ' There should be a newer version of Bzrtools available, e.g.'
59
 
                ' %i.%i.'
 
55
        warning('Bzrtools is not up to date with installed bzr version %s.'
 
56
                ' \nThere should be a newer version available, e.g. %i.%i.' 
60
57
                % (bzrlib.__version__, bzrlib_version[0], bzrlib_version[1]))
61
58
        if bzrlib_version != desired_plus:
62
59
            raise Exception, 'Version mismatch'
554
551
 
555
552
    def _takes_options(self):
556
553
        options = list(get_cmd_object('diff').takes_options)
557
 
        options.append(Option('check-style',
558
 
            help='Warn if trailing whitespace or spurious changes have been'
559
 
                 ' added.'))
 
554
        options.append(Option('check-style'))
560
555
        return options
561
556
 
562
557
    takes_options = property(_takes_options)