changeset 1387:b9975bc80bb6

maps: remove unneeded load method from author map
author Sean Farley <sean.michael.farley@gmail.com>
date Mon, 24 Mar 2014 11:20:59 -0500
parents 8bd40916106f
children 130ced9e371d
files hgsubversion/maps.py
diffstat 1 files changed, 0 insertions(+), 43 deletions(-) [+]
line wrap: on
line diff
--- 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