This commit is contained in:
Augie Fackler 2012-10-25 23:22:36 -05:00
commit 586391e789

View File

@ -133,15 +133,17 @@ class GitHandler(object):
def init_author_file(self):
self.author_map = {}
if self.ui.config('git', 'authors'):
with open(self.repo.wjoin(
self.ui.config('git', 'authors')
)) as f:
f = open(self.repo.wjoin(
self.ui.config('git', 'authors')))
try:
for line in f:
line = line.strip()
if not line or line.startswith('#'):
continue
from_, to = RE_AUTHOR_FILE.split(line, 2)
self.author_map[from_] = to
finally:
f.close()
## FILE LOAD AND SAVE METHODS