# HG changeset patch # User Sean Farley # Date 1395678059 18000 # Node ID b9975bc80bb69ad43519748b3aa567fe24c7053d # Parent 8bd40916106f9fc5b952e7f165affda0e56d7515 maps: remove unneeded load method from author map diff --git a/hgsubversion/maps.py b/hgsubversion/maps.py --- a/hgsubversion/maps.py +++ b/hgsubversion/maps.py @@ -97,49 +97,6 @@ class AuthorMap(BaseMap): super(AuthorMap, self).__init__(meta) - def load(self, path): - ''' Load mappings from a file at the specified path. ''' - - path = os.path.expandvars(path) - if not os.path.exists(path): - return - - writing = False - if path != self.meta.authormap_file: - writing = open(self.meta.authormap_file, 'a') - - self.meta.ui.debug('reading authormap from %s\n' % path) - f = open(path, 'r') - for number, line_org in enumerate(f): - - line = line_org.split('#')[0] - if not line.strip(): - continue - - try: - src, dst = line.split('=', 1) - except (IndexError, ValueError): - msg = 'ignoring line %i in author map %s: %s\n' - self.meta.ui.status(msg % (number, path, line.rstrip())) - continue - - src = src.strip() - dst = dst.strip() - - if writing: - if not src in self: - self.meta.ui.debug('adding author %s to author map\n' % src) - elif dst != self[src]: - msg = 'overriding author: "%s" to "%s" (%s)\n' - self.meta.ui.status(msg % (self[src], dst, src)) - writing.write(line_org) - - self[src] = dst - - f.close() - if writing: - writing.close() - def __setitem__(self, key, value): '''Similar to dict.__setitem__, except we check caseignoreauthors to use lowercase string or not