Handle conversion between the various BE storage formats.
Methods
check_initial_version() | |
get_path(*args) | Return the absolute path using args relative to .be. |
set_version() | |
upgrade() |
Methods
check_initial_version() | |
get_path(*args) | Return the absolute path using args relative to .be. |
set_version() | |
upgrade() |
Methods
check_initial_version() | |
get_path(*args) | Return the absolute path using args relative to .be. |
set_version() | |
upgrade() |
Methods
check_initial_version() | |
get_path(*args) | Return the absolute path using args relative to .be. |
set_version() | |
upgrade() |
Methods
check_initial_version() | |
get_path(*args) | Return the absolute path using args relative to .be. |
set_version() | |
upgrade() |
Class for converting between different on-disk BE storage formats.
Attributes
final_version | |
initial_version |
Methods
check_initial_version() | |
get_path(*args) | Return the absolute path using args relative to .be. |
set_version() | |
upgrade() |
Return the absolute path using args relative to .be.
From v1.1 to v1.5, BE dirs used YAML mapfiles
>>> generate_yaml_mapfile({'q':'p'})
'q: p\n\n'
>>> generate_yaml_mapfile({'q':u'Fran\u00e7ais'})
'q: Fran\xc3\xa7ais\n\n'
>>> generate_yaml_mapfile({'q':u'hello'})
'q: hello\n\n'
From v1.1 to v1.5, BE dirs used YAML mapfiles
>>> parse_yaml_mapfile('q: p\n\n')['q']
'p'
>>> parse_yaml_mapfile('q: \'p\'\n\n')['q']
'p'
>>> contents = generate_yaml_mapfile({'a':'b', 'c':'d', 'e':'f'})
>>> dict = parse_yaml_mapfile(contents)
>>> dict['a']
'b'
>>> dict['c']
'd'
>>> dict['e']
'f'
>>> contents = generate_yaml_mapfile({'q':u'Fran\u00e7ais'})
>>> dict = parse_yaml_mapfile(contents)
>>> dict['q']
u'Fran\xe7ais'
Call the appropriate upgrade function to convert current_version to target_version. If a direct conversion function does not exist, use consecutive conversion functions.
alias of Upgrade_1_4_to_1_5