~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to command.py

  • Committer: Aaron Bentley
  • Date: 2011-04-15 00:39:34 UTC
  • mfrom: (749.2.1 2.3)
  • Revision ID: aaron@aaronbentley.com-20110415003934-z90vvijgv8v9397i
Merged 2.3 into bzrtools.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright (C) 2007, 2009, 2010, 2011 Aaron Bentley.
 
2
# Copyright (C) 2009 Max Bowsher.
 
3
#
 
4
#    This program is free software; you can redistribute it and/or modify
 
5
#    it under the terms of the GNU General Public License as published by
 
6
#    the Free Software Foundation; either version 2 of the License, or
 
7
#    (at your option) any later version.
 
8
#
 
9
#    This program is distributed in the hope that it will be useful,
 
10
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
#    GNU General Public License for more details.
 
13
#
 
14
#    You should have received a copy of the GNU General Public License
 
15
#    along with this program; if not, write to the Free Software
 
16
#    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
17
 
 
18
 
1
19
import bzrlib
2
20
from bzrlib import commands
3
21
 
35
53
        return
36
54
    desired_plus = (desired[0], desired[1]+1)
37
55
    bzrlib_version = bzrlib.version_info[:2]
38
 
    if bzrlib_version == desired or (bzrlib_version == desired_plus and
39
 
                                     bzrlib.version_info[3] == 'dev'):
 
56
    if bzrlib_version == desired:
 
57
        return
 
58
    if (bzrlib_version == desired_plus and
 
59
        bzrlib.version_info[3] not in ('final', 'candidate')):
40
60
        return
41
61
    try:
42
62
        from bzrlib.trace import warning