From 4447fd84990534566470ffa943f9c1ef6c6832b0 Mon Sep 17 00:00:00 2001 From: Abderrahim Kitouni Date: Tue, 28 Jul 2009 23:10:04 +0100 Subject: [PATCH] fix invalid timezone handling --- git_handler.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/git_handler.py b/git_handler.py index 8da56d1212..f8ee88ed4c 100644 --- a/git_handler.py +++ b/git_handler.py @@ -2,7 +2,7 @@ import os, sys, math, urllib, re import toposort from dulwich.index import commit_tree -from dulwich.objects import Blob, Commit, Tag, Tree +from dulwich.objects import Blob, Commit, Tag, Tree, format_timezone from dulwich.pack import create_delta, apply_delta from dulwich.repo import Repo @@ -247,6 +247,8 @@ class GitHandler(object): commit.committer = name commit.commit_time = timestamp commit.commit_timezone = -int(timezone) + # work around a timezone format change + format_timezone(-int(timezone)) except ValueError: #pragma: no cover self.ui.warn(_("Ignoring committer in extra, invalid timezone in r%d: '%s'.\n") % (ctx, timezone)) commit.committer = commit.author