Mercurial > hg-git
changeset 140:6701ab807bf5
Deal with invalid timezones in extra commiter
author | Sverre Rabbelier <sverre@rabbelier.nl> |
---|---|
date | Mon, 25 May 2009 01:44:38 +0200 |
parents | 2fa3ac775983 |
children | a989866eead8 |
files | git_handler.py |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/git_handler.py Tue May 19 10:00:56 2009 -0700 +++ b/git_handler.py Mon May 25 01:44:38 2009 +0200 @@ -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']