diff git_handler.py @ 118:b3be536e3f50

handles git commit encoding fields now
author Scott Chacon <schacon@gmail.com>
date Mon, 11 May 2009 16:03:57 -0700
parents d862b6a4fbd4
children 35ad13185e60 9dafb9ac24ff ed4e8c2cd016 f2dfb2bed724 366052cae03c
line wrap: on
line diff
--- a/git_handler.py	Mon May 11 11:35:30 2009 -0700
+++ b/git_handler.py	Mon May 11 16:03:57 2009 -0700
@@ -210,6 +210,8 @@
         extra = ctx.extra()
         if 'committer' in extra:
             commit['committer'] = extra['committer']
+        if 'encoding' in extra:
+            commit['encoding'] = extra['encoding']
 
         # HG EXTRA INFORMATION
         add_extras = False
@@ -584,9 +586,12 @@
         if not commit._author_raw == commit._committer_raw:
             extra['committer'] = commit._committer_raw
 
+        if commit._encoding:
+            extra['encoding'] = commit._encoding
+
         if hg_branch:
             extra['branch'] = hg_branch
-                
+
         text = strip_message
         date = datetime.datetime.fromtimestamp(commit.author_time).strftime("%Y-%m-%d %H:%M:%S")
         ctx = context.memctx(self.repo, (p1, p2), text, files, getfilectx,