Commits

Steve Borho  committed 6a5cf95

hgshelve: convert fancy diff header to UTF-8 for display

fixes #17

  • Participants
  • Parent commits 0afae2e

Comments (0)

Files changed (1)

File hggtk/hgshelve.py

 from mercurial import cmdutil, commands, cmdutil, hg, mdiff, patch, revlog
 from mercurial import util, fancyopts
 import copy, cStringIO, errno, operator, os, re, shutil, tempfile
+import hglib
 
 lines_re = re.compile(r'@@ -(\d+),(\d+) \+(\d+),(\d+) @@\s*(.*)')
 
                 str += _('this modifies a binary file (all or nothing)\n')
                 break
             if self.pretty_re.match(h):
-                str += h
+                str += hglib.toutf(h)
                 if self.binary():
                     str += _('this is a binary file\n')
                 break
                         'selected: %d hunks (%d changed lines)</i>') % (hunks,
                                 lines, shunks, slines)
                 break
-            str += h
+            str += hglib.toutf(h)
         return str
 
     def pretty(self, fp):