Skip to content
Snippets Groups Projects
Commit 6701ab80 authored by Sverre Rabbelier's avatar Sverre Rabbelier
Browse files

Deal with invalid timezones in extra commiter

parent 2fa3ac77
No related branches found
No related tags found
No related merge requests found
......@@ -247,8 +247,11 @@
if 'committer' in extra:
# fixup timezone
(name_timestamp, timezone) = extra['committer'].rsplit(' ', 1)
timezone = format_timezone(-int(timezone))
commit['committer'] = '%s %s' % (name_timestamp, timezone)
try:
timezone = format_timezone(-int(timezone))
commit['committer'] = '%s %s' % (name_timestamp, timezone)
except ValueError:
self.ui.warn(_("Ignoring committer in extra, invalid timezone in r%s: '%s'.\n") % (rev, timezone))
if 'encoding' in extra:
commit['encoding'] = extra['encoding']
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment