Revision 93fd9bb1 tools/cfgupgrade
b/tools/cfgupgrade | ||
---|---|---|
1 | 1 |
#!/usr/bin/python |
2 | 2 |
# |
3 | 3 |
|
4 |
# Copyright (C) 2007, 2008, 2009, 2010 Google Inc. |
|
4 |
# Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012 Google Inc.
|
|
5 | 5 |
# |
6 | 6 |
# This program is free software; you can redistribute it and/or modify |
7 | 7 |
# it under the terms of the GNU General Public License as published by |
... | ... | |
46 | 46 |
args = None |
47 | 47 |
|
48 | 48 |
|
49 |
#: Target major version we will upgrade to |
|
50 |
TARGET_MAJOR = 2 |
|
51 |
#: Target minor version we will upgrade to |
|
52 |
TARGET_MINOR = 6 |
|
53 |
|
|
54 |
|
|
49 | 55 |
class Error(Exception): |
50 | 56 |
"""Generic exception""" |
51 | 57 |
pass |
... | ... | |
175 | 181 |
" configuration file") |
176 | 182 |
|
177 | 183 |
# Upgrade from 2.0/2.1/2.2/2.3 to 2.4 |
178 |
if config_major == 2 and config_minor in (0, 1, 2, 3, 4): |
|
184 |
if config_major == 2 and config_minor in (0, 1, 2, 3, 4, 5):
|
|
179 | 185 |
if config_revision != 0: |
180 | 186 |
logging.warning("Config revision is %s, not 0", config_revision) |
181 | 187 |
|
182 |
config_data["version"] = constants.BuildVersion(2, 5, 0) |
|
188 |
config_data["version"] = constants.BuildVersion(TARGET_MAJOR, |
|
189 |
TARGET_MINOR, 0) |
|
183 | 190 |
|
184 |
elif config_major == 2 and config_minor == 5:
|
|
191 |
elif config_major == TARGET_MAJOR and config_minor == TARGET_MINOR:
|
|
185 | 192 |
logging.info("No changes necessary") |
186 | 193 |
|
187 | 194 |
else: |
Also available in: Unified diff