~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to command.py

  • Committer: Aaron Bentley
  • Date: 2008-05-30 02:46:25 UTC
  • Revision ID: aaron@aaronbentley.com-20080530024625-anlzob2j6z2s7ebv
Remove references to PyBaz

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
import bzrlib
2
2
from bzrlib import commands
3
3
 
4
 
from version import version_info, __version__
5
 
 
6
 
 
7
 
_testing = False
8
 
# True if we are currently testing commands via the test suite.
9
 
 
10
 
def _stop_testing():
11
 
    """Set the _testing flag to indicate we are no longer testing."""
12
 
    global _testing
13
 
    _testing = False
 
4
from version import *
14
5
 
15
6
 
16
7
class BzrToolsCommand(commands.Command):
30
21
    If version == bzrtools version + 1, assume compatible, with deprecations
31
22
    Otherwise, assume incompatible.
32
23
    """
33
 
    global _testing
34
 
    if _testing:
35
 
        return
36
24
    desired_plus = (desired[0], desired[1]+1)
37
25
    bzrlib_version = bzrlib.version_info[:2]
38
26
    if bzrlib_version == desired or (bzrlib_version == desired_plus and
47
35
        warning('Installed Bazaar version %s is too old to be used with'
48
36
                ' plugin \n'
49
37
                '"Bzrtools" %s.' % (
50
 
                bzrlib.__version__, __version__))
 
38
                bzrlib.__version__, '%s.%s.%s' % version_info))
51
39
        # Not using BzrNewError, because it may not exist.
52
40
        return 3
53
41
    else: