Mercurial > hgsubversion
changeset 1393:f53a27e4e0d3
maps: remove unneeded load method from tag map
author | Sean Farley <sean.michael.farley@gmail.com> |
---|---|
date | Mon, 24 Mar 2014 11:21:00 -0500 |
parents | ec01aa2d088e |
children | c4055968f030 |
files | hgsubversion/maps.py |
diffstat | 1 files changed, 0 insertions(+), 40 deletions(-) [+] |
line wrap: on
line diff
--- a/hgsubversion/maps.py +++ b/hgsubversion/maps.py @@ -435,43 +435,3 @@ class TagMap(BaseMap): def __init__(self, meta): super(TagMap, self).__init__(meta) - - def load(self, path): - '''Load mappings from a file at the specified path.''' - if not os.path.exists(path): - return - - writing = False - if path != self.meta.tagmap_file: - writing = open(self.meta.tagmap_file, 'a') - - self.meta.ui.debug('reading tag renames from %s\n' % path) - f = open(path, 'r') - for number, line in enumerate(f): - - if writing: - writing.write(line) - - line = line.split('#')[0] - if not line.strip(): - continue - - try: - src, dst = line.split('=', 1) - except (IndexError, ValueError): - msg = 'ignoring line %i in tag renames %s: %s\n' - self.meta.ui.status(msg % (number, path, line.rstrip())) - continue - - src = src.strip() - dst = dst.strip() - self.meta.ui.debug('adding tag %s to tag renames\n' % src) - - if src in self and dst != self[src]: - msg = 'overriding tag rename: "%s" to "%s" (%s)\n' - self.meta.ui.status(msg % (self[src], dst, src)) - self[src] = dst - - f.close() - if writing: - writing.close()