Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.4rc2, 0.4rc3, and 0.4rc4

hggtk/history: fix UTF encoding error in committer field

Developer Note:
experimenting with mercurial.util.fromlocal() for UTF encoding

Changeset 5a9bcfad23c9

Parent f4799554efd4

by TK Soh

Changes to 2 files · Browse files at 5a9bcfad23c9 Showing diff from parent f4799554efd4 Diff from another changeset...

 
106
107
108
109
 
 
110
111
112
 
106
107
108
 
109
110
111
112
113
@@ -106,7 +106,8 @@
  def _fill_buffer(self, buf, rev, ctx, filelist):   def title_line(title, text, tag):   pad = ' ' * (12 - len(title)) - buf.insert_with_tags_by_name(eob, title + pad + text, tag) + utext = util.fromlocal(title + pad + text) + buf.insert_with_tags_by_name(eob, utext, tag)   buf.insert(eob, "\n")     # TODO: Add toggle for gmtime/localtime
 
95
96
97
98
 
 
99
100
 
101
102
103
 
95
96
97
 
98
99
100
 
101
102
103
104
@@ -95,9 +95,10 @@
  tags = ', '.join(self.repo.nodetags(node))     if '<' in ctx.user(): - author = self.author_re.sub('', ctx.user()).strip(' ') + author = util.fromlocal((self.author_re.sub('', + ctx.user()).strip(' ')))   else: - author = util.shortuser(ctx.user()) + author = util.fromlocal(util.shortuser(ctx.user()))     date = strftime("%Y-%m-%d %H:%M:%S", gmtime(ctx.date()[0]))