mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 08:47:12 +03:00
Deal with hg authors missing email attributes.
This commit is contained in:
parent
bceee848ca
commit
4d1a21a4a7
@ -194,7 +194,12 @@ class GitHandler(object):
|
||||
commit = {}
|
||||
commit['tree'] = tree_sha
|
||||
(time, timezone) = ctx.date()
|
||||
commit['author'] = ctx.user() + ' ' + str(int(time)) + ' ' + seconds_to_offset(timezone)
|
||||
|
||||
# hg authors might not have emails
|
||||
author = ctx.user()
|
||||
if not '>' in author:
|
||||
author = author + ' <none@none>'
|
||||
commit['author'] = author + ' ' + str(int(time)) + ' ' + seconds_to_offset(timezone)
|
||||
message = ctx.description()
|
||||
commit['message'] = ctx.description()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user