diff options
author | W. Trevor King <wking@drexel.edu> | 2009-08-31 13:16:48 -0400 |
---|---|---|
committer | W. Trevor King <wking@drexel.edu> | 2009-08-31 13:16:48 -0400 |
commit | 5e8576a48fae6e9f7a9699d57571e926d7e6e236 (patch) | |
tree | 82600e1eedbeb059cb03903fbbfa81be5778459e /libbe/mapfile.py | |
parent | 830522c293a479636d7bfc0fff125ec57f06e9a3 (diff) | |
download | bugseverywhere-5e8576a48fae6e9f7a9699d57571e926d7e6e236.tar.gz |
Upgrade duplicate bugdirs if necessary (e.g. for `be diff').
Also moved pre-YAML mapfile handling in mapfile.parse() into
upgrade.Upgrade_1_0_to_2._upgrade_mapfile().
Diffstat (limited to 'libbe/mapfile.py')
-rw-r--r-- | libbe/mapfile.py | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/libbe/mapfile.py b/libbe/mapfile.py index b959d76..74d2b1a 100644 --- a/libbe/mapfile.py +++ b/libbe/mapfile.py @@ -95,24 +95,6 @@ def parse(contents): >>> dict["e"] 'f' """ - old_format = False - for line in contents.splitlines(): - if len(line.split("=")) == 2: - old_format = True - break - if old_format: # translate to YAML. Hack to deal with old BE bugs. - newlines = [] - for line in contents.splitlines(): - line = line.rstrip('\n') - if len(line) == 0: - continue - fields = line.split("=") - if len(fields) == 2: - key,value = fields - newlines.append('%s: "%s"' % (key, value.replace('"','\\"'))) - else: - newlines.append(line) - contents = '\n'.join(newlines) return yaml.load(contents) or {} def map_save(rcs, path, map, allow_no_rcs=False): |