Force encoding author names in UTF-8 for fast-import.master
authorMiklos Vajna <vmiklos@frugalware.org>
Fri, 17 Oct 2008 19:45:15 +0000 (17 21:45 +0200)
committerMiklos Vajna <vmiklos@frugalware.org>
Fri, 17 Oct 2008 19:45:15 +0000 (17 21:45 +0200)
This is necessary as other encodings are not permitted (according to
gfi's documentation).

Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
darcs2git.py

index 54e31ed..132997c 100755 (executable)
@@ -702,7 +702,7 @@ def export_commit (repo, patch, last_patch, gfi):
     gfi.write ('commit refs/heads/darcstmp%d\n' % patch.number)
     gfi.write ('mark :%d\n' % (patch.number + 1))
 
-    raw_name = patch.author_name
+    raw_name = patch.author_name.encode('UTF-8')
     gfi.write ('committer %s <%s> %s\n' % (raw_name,
                                            patch.author_mail,
                                            patch.date))