mirror of
https://github.com/frej/fast-export.git
synced 2025-11-02 09:15:48 +01:00
Remove \" from the user string before trying to extract name and email
Signed-off-by: Frej Drejhammar <frej.drejhammar@gmail.com> Reported-by: Cole Robinson <crobinso@redhat.com> 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
This commit is contained in:
@@ -34,6 +34,7 @@ def setup_repo(url):
|
|||||||
return myui,hg.repository(myui,url)
|
return myui,hg.repository(myui,url)
|
||||||
|
|
||||||
def fixup_user(user,authors):
|
def fixup_user(user,authors):
|
||||||
|
user=user.strip("\"")
|
||||||
if authors!=None:
|
if authors!=None:
|
||||||
# if we have an authors table, try to get mapping
|
# if we have an authors table, try to get mapping
|
||||||
# by defaulting to the current value of 'user'
|
# by defaulting to the current value of 'user'
|
||||||
|
|||||||
Reference in New Issue
Block a user