@@ -487,24 +487,26 @@ def is_git(repository):
def is_hg(repository):
if hasattr(repository, 'alias'):
_type = repository.alias
elif hasattr(repository, 'repo_type'):
_type = repository.repo_type
else:
_type = repository
return _type == 'hg'
def email_or_none(author):
if not author:
return None
# extract email from the commit string
_email = email(author)
if _email:
# check it against Kallithea database, and use the MAIN email for this
# user
user = User.get_by_email(_email, case_insensitive=True, cache=True)
if user is not None:
return user.email
return _email
# See if it contains a username we can get an email from
user = User.get_by_username(author_name(author), case_insensitive=True,
Status change: