Mercurial > hgsubversion
comparison hgsubversion/svnmeta.py @ 1194:49791c40a8a5
maps: change authormap to initialize with an svnmeta object
This refactoring will help us break AuthorMaps access of global options via
ui.config allowing us to use svnmeta as the central store for reading and
writing configuration options.
author | Sean Farley <sean.michael.farley@gmail.com> |
---|---|
date | Mon, 24 Mar 2014 11:20:46 -0500 |
parents | a55339d35066 |
children | 1414cdafa7af |
comparison
equal
deleted
inserted
replaced
1193:a55339d35066 | 1194:49791c40a8a5 |
---|---|
37 self._gen_cachedconfig('defaultauthors', True) | 37 self._gen_cachedconfig('defaultauthors', True) |
38 self._gen_cachedconfig('caseignoreauthors', False) | 38 self._gen_cachedconfig('caseignoreauthors', False) |
39 self._gen_cachedconfig('defaulthost', self.uuid) | 39 self._gen_cachedconfig('defaulthost', self.uuid) |
40 self._gen_cachedconfig('usebranchnames', True) | 40 self._gen_cachedconfig('usebranchnames', True) |
41 | 41 |
42 author_host = self.ui.config('hgsubversion', 'defaulthost', uuid) | |
43 branchmap = util.configpath(self.ui, 'branchmap') | 42 branchmap = util.configpath(self.ui, 'branchmap') |
44 tagmap = util.configpath(self.ui, 'tagmap') | 43 tagmap = util.configpath(self.ui, 'tagmap') |
45 filemap = util.configpath(self.ui, 'filemap') | 44 filemap = util.configpath(self.ui, 'filemap') |
46 | 45 |
47 self.branches = util.load(self.branch_info_file) or {} | 46 self.branches = util.load(self.branch_info_file) or {} |
49 self._tags = None | 48 self._tags = None |
50 self._layout = layouts.detect.layout_from_file(self.metapath, | 49 self._layout = layouts.detect.layout_from_file(self.metapath, |
51 ui=self.repo.ui) | 50 ui=self.repo.ui) |
52 self._layoutobj = None | 51 self._layoutobj = None |
53 | 52 |
54 self.authors = maps.AuthorMap(self.ui, self.authors_file, | 53 self.authors = maps.AuthorMap(self) |
55 defaulthost=author_host) | |
56 | 54 |
57 self.branchmap = maps.BranchMap(self.ui, self.branchmap_file) | 55 self.branchmap = maps.BranchMap(self.ui, self.branchmap_file) |
58 if branchmap: | 56 if branchmap: |
59 self.branchmap.load(branchmap) | 57 self.branchmap.load(branchmap) |
60 | 58 |