##// END OF EJS Templates
fixes #567 diff non-unicode encoding missmatch...
marcink -
r2843:ab75def5 beta
parent child Browse files
Show More
@@ -44,6 +44,7 b' from rhodecode.lib.vcs.nodes import File'
44 from rhodecode.lib.vcs.backends.base import EmptyChangeset
44 from rhodecode.lib.vcs.backends.base import EmptyChangeset
45 from rhodecode.lib.helpers import escape
45 from rhodecode.lib.helpers import escape
46 from rhodecode.lib.utils import make_ui
46 from rhodecode.lib.utils import make_ui
47 from rhodecode.lib.utils2 import safe_unicode
47
48
48
49
49 def wrap_to_table(str_):
50 def wrap_to_table(str_):
@@ -214,7 +215,7 b' class DiffProcessor(object):'
214 self.adds += 1
215 self.adds += 1
215 elif l.startswith('-') and not l.startswith('---'):
216 elif l.startswith('-') and not l.startswith('---'):
216 self.removes += 1
217 self.removes += 1
217 return l.decode('utf8', 'replace')
218 return safe_unicode(l)
218
219
219 output = list(diffiterator)
220 output = list(diffiterator)
220 size = len(output)
221 size = len(output)
@@ -13,6 +13,7 b' from mercurial.match import match'
13
13
14 from rhodecode.lib.vcs.exceptions import VCSError
14 from rhodecode.lib.vcs.exceptions import VCSError
15 from rhodecode.lib.vcs.nodes import FileNode, NodeError
15 from rhodecode.lib.vcs.nodes import FileNode, NodeError
16 from rhodecode.lib.vcs.utils import safe_unicode
16
17
17
18
18 def get_udiff(filenode_old, filenode_new, show_whitespace=True):
19 def get_udiff(filenode_old, filenode_new, show_whitespace=True):
@@ -149,7 +150,7 b' class DiffProcessor(object):'
149 self.adds += 1
150 self.adds += 1
150 elif l.startswith('-') and not l.startswith('---'):
151 elif l.startswith('-') and not l.startswith('---'):
151 self.removes += 1
152 self.removes += 1
152 return l.decode('utf8', 'replace')
153 return safe_unicode(l)
153
154
154 output = list(diffiterator)
155 output = list(diffiterator)
155 size = len(output)
156 size = len(output)
General Comments 0
You need to be logged in to leave comments. Login now