# HG changeset patch # User Augie Fackler # Date 1465188405 14400 # Node ID a0ba38def79b42b1161e9a6b7844eafef768ee68 # Parent e79ff1a85938b2c5bc197a2d4dc43403819e9a15 AuthorMap: no longer take a meta diff --git a/hgsubversion/maps.py b/hgsubversion/maps.py --- 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 diff --git a/hgsubversion/svnmeta.py b/hgsubversion/svnmeta.py --- 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 diff --git a/tests/test_fetch_mappings.py b/tests/test_fetch_mappings.py --- 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)