From 486690e1764f63448f261c7bd95e8b2f1e28773b Mon Sep 17 00:00:00 2001 From: Frej Drejhammar Date: Fri, 18 Mar 2011 19:12:45 +0100 Subject: [PATCH] Remove \" from the user string before trying to extract name and email Signed-off-by: Frej Drejhammar Reported-by: Cole Robinson Thank's to Cole Robinson for reporting the bug and providing a fix which was adapted to this patch. The original bug report: I was recently converting a few mercurial repositories to git, and noticed certain commits had their date reset to Jan 1 1970. An example repo: http://hg.fedorahosted.org/hg/virt-manager An example commit: http://hg.fedorahosted.org/hg/virt-manager/rev/41182500ddef After some poking, it seems the culprit was that the "author:" was surrounded by quotation marks --- hg2git.py | 1 + 1 file changed, 1 insertion(+) diff --git a/hg2git.py b/hg2git.py index 3c0d1e3..baa41cd 100755 --- a/hg2git.py +++ b/hg2git.py @@ -34,6 +34,7 @@ def setup_repo(url): return myui,hg.repository(myui,url) def fixup_user(user,authors): + user=user.strip("\"") if authors!=None: # if we have an authors table, try to get mapping # by defaulting to the current value of 'user' -- 2.11.4.GIT