From 71f4fef0d7c955765d35853500239e58a1de1f66 Mon Sep 17 00:00:00 2001 From: Daniel Lenski Date: Thu, 23 Jul 2015 11:45:26 -0700 Subject: [PATCH] fix URLs in summaries --- wp2git.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wp2git.py b/wp2git.py index a2286a6..ba004e2 100755 --- a/wp2git.py +++ b/wp2git.py @@ -93,7 +93,8 @@ def main(): ts = time.mktime(rev['timestamp']) print((" >> Revision %d by %s at %s: %s" % (id, rev.get('user',''), time.ctime(ts), rev['comment'])).encode('ascii','xmlcharrefreplace'), file=stderr) - summary = '%s\n\nURL: http://%s%sindex.php?oldid=%d' % (rev.get('comment','').encode('utf8') or '', site.host, site.path, id) + summary = '%s\n\nURL: %s://%s%sindex.php?oldid=%d' % (rev.get('comment','').encode('utf8') or '', + site.host[0], site.host[1], site.path, id) fid.write('commit refs/heads/master\n') fid.write('committer <%s> %d +0000\n' % (committer, ts))