Commits

Sean Farley  committed a55339d

maps: load commandline authormap in __init__

Funcationally, this is the same as before but consolidates the logic to its own
object so we later refactor all the map objects to inherit from a common base
object.

  • Participants
  • Parent commits 23a845f

Comments (0)

Files changed (2)

File hgsubversion/maps.py

         self.super.__init__()
         self.load(path)
 
+        # append authors specified from the commandline
+        clmap = util.configpath(self.ui, 'authormap')
+        if clmap:
+            self.load(clmap)
+
     def load(self, path):
         ''' Load mappings from a file at the specified path. '''
 

File hgsubversion/svnmeta.py

         self._gen_cachedconfig('usebranchnames', True)
 
         author_host = self.ui.config('hgsubversion', 'defaulthost', uuid)
-        authors = util.configpath(self.ui, 'authormap')
         branchmap = util.configpath(self.ui, 'branchmap')
         tagmap = util.configpath(self.ui, 'tagmap')
         filemap = util.configpath(self.ui, 'filemap')
         self._layoutobj = None
 
         self.authors = maps.AuthorMap(self.ui, self.authors_file,
-                                 defaulthost=author_host)
-        if authors: self.authors.load(authors)
+                                      defaulthost=author_host)
 
         self.branchmap = maps.BranchMap(self.ui, self.branchmap_file)
         if branchmap: