changeset 1067:ddae0045de4e

config: register git.authors
author Kevin Bullock <kbullock@ringworld.org>
date Tue, 24 Oct 2017 14:26:35 -0500
parents 78dc28eb4245
children f4c2b42731ea
files hggit/compat.py hggit/git_handler.py
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hggit/compat.py
+++ b/hggit/compat.py
@@ -64,6 +64,7 @@
 
 CONFIG_DEFAULTS = {
     'git': {
+        'authors': None,
         'blockdotgit': True,
         'branch_bookmark_suffix': None,
         'intree': None,
--- a/hggit/git_handler.py
+++ b/hggit/git_handler.py
@@ -158,8 +158,9 @@
 
     def init_author_file(self):
         self.author_map = {}
-        if self.ui.config('git', 'authors'):
-            with open(self.repo.wvfs.join(self.ui.config('git', 'authors'))) as f:
+        authors_path = compat.config(self.ui, 'string', 'git', 'authors')
+        if authors_path:
+            with open(self.repo.wvfs.join(authors_path)) as f:
                 for line in f:
                     line = line.strip()
                     if not line or line.startswith('#'):