changeset 1442:a0ba38def79b

AuthorMap: no longer take a meta
author Augie Fackler <raf@durin42.com>
date Mon, 06 Jun 2016 00:46:45 -0400
parents e79ff1a85938
children 887430c1b8ab
files hgsubversion/maps.py hgsubversion/svnmeta.py tests/test_fetch_mappings.py
diffstat 3 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/hgsubversion/maps.py
+++ b/hgsubversion/maps.py
@@ -190,7 +190,7 @@ class AuthorMap(BaseMap):
     the userid from Subversion is always compared lowercase.
     '''
 
-    def __init__(self, meta, defaulthost, caseignoreauthors,
+    def __init__(self, ui, filepath, defaulthost, caseignoreauthors,
                  mapauthorscmd, defaultauthors):
         '''Initialise a new AuthorMap.
 
@@ -208,8 +208,7 @@ class AuthorMap(BaseMap):
         self._defaulthost = defaulthost
         self._defaultauthors = defaultauthors
 
-        super(AuthorMap, self).__init__(
-            meta.ui, meta.__getattribute__(self.defaultfilenameattr))
+        super(AuthorMap, self).__init__(ui, filepath)
 
     def _lowercase(self, key):
         '''Determine whether or not to lowercase a str or regex using the
--- a/hgsubversion/svnmeta.py
+++ b/hgsubversion/svnmeta.py
@@ -292,8 +292,8 @@ class SVNMeta(object):
     def authors(self):
         if self._authors is None:
             self._authors = maps.AuthorMap(
-                self, self.defaulthost, self.caseignoreauthors,
-                self.mapauthorscmd, self.defaultauthors)
+                self.ui, self.authormap_file, self.defaulthost,
+                self.caseignoreauthors, self.mapauthorscmd, self.defaultauthors)
         return self._authors
 
     @property
--- a/tests/test_fetch_mappings.py
+++ b/tests/test_fetch_mappings.py
@@ -93,8 +93,9 @@ class MapTests(test_util.TestBase):
         new.write(open(orig).read())
         new.close()
         meta = self.repo.svnmeta(skiperrorcheck=True)
-        test = maps.AuthorMap(meta, meta.defaulthost, meta.caseignoreauthors,
-                              meta.mapauthorscmd, meta.defaultauthors)
+        test = maps.AuthorMap(
+            meta.ui, meta.authormap_file, meta.defaulthost,
+            meta.caseignoreauthors, meta.mapauthorscmd, meta.defaultauthors)
         fromself = set(test)
         test.load(orig)
         all_tests = set(test)