You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by jo...@apache.org on 2014/01/23 23:05:39 UTC

[1/2] git commit: [#7022] Fixed pep8 error

Updated Branches:
  refs/heads/master 6eefcd329 -> 3e45f6cc6


[#7022] Fixed pep8 error

Signed-off-by: Cory Johns <cj...@slashdotmedia.com>


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/3e45f6cc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/3e45f6cc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/3e45f6cc

Branch: refs/heads/master
Commit: 3e45f6cc6756e161f95b66a4c359cf3fe2a5aeef
Parents: bc4c564
Author: Cory Johns <cj...@slashdotmedia.com>
Authored: Thu Jan 23 22:02:03 2014 +0000
Committer: Cory Johns <cj...@slashdotmedia.com>
Committed: Thu Jan 23 22:05:35 2014 +0000

----------------------------------------------------------------------
 Allura/allura/lib/diff.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/3e45f6cc/Allura/allura/lib/diff.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/diff.py b/Allura/allura/lib/diff.py
index bdeb76d..2691b65 100644
--- a/Allura/allura/lib/diff.py
+++ b/Allura/allura/lib/diff.py
@@ -113,4 +113,5 @@ class HtmlSideBySideDiff(object):
         bdesc = bdesc or ''
         diff = difflib._mdiff(a, b, context=context)
         lines = [self._make_line(d) for d in diff]
-        return h.really_unicode(self.table_tmpl % (adesc, bdesc, '\n'.join(lines)))
+        return h.really_unicode(
+            self.table_tmpl % (adesc, bdesc, '\n'.join(lines)))


[2/2] git commit: [#7022] ticket:519 UnicodeDecodeError on side-by-side diff text

Posted by jo...@apache.org.
[#7022] ticket:519 UnicodeDecodeError on side-by-side diff text


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/bc4c5649
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/bc4c5649
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/bc4c5649

Branch: refs/heads/master
Commit: bc4c5649e6d91f0fdb24dbc9fce9a5d497919c8e
Parents: 6eefcd3
Author: Yuriy Arhipov <yu...@yandex.ru>
Authored: Sun Jan 19 23:33:23 2014 +0400
Committer: Cory Johns <cj...@slashdotmedia.com>
Committed: Thu Jan 23 22:05:35 2014 +0000

----------------------------------------------------------------------
 Allura/allura/lib/diff.py        | 3 ++-
 Allura/allura/tests/test_diff.py | 7 +++++++
 2 files changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/bc4c5649/Allura/allura/lib/diff.py
----------------------------------------------------------------------
diff --git a/Allura/allura/lib/diff.py b/Allura/allura/lib/diff.py
index d595fe3..bdeb76d 100644
--- a/Allura/allura/lib/diff.py
+++ b/Allura/allura/lib/diff.py
@@ -16,6 +16,7 @@
 #       under the License.
 
 import difflib
+from allura.lib import helpers as h
 
 
 class HtmlSideBySideDiff(object):
@@ -112,4 +113,4 @@ class HtmlSideBySideDiff(object):
         bdesc = bdesc or ''
         diff = difflib._mdiff(a, b, context=context)
         lines = [self._make_line(d) for d in diff]
-        return self.table_tmpl % (adesc, bdesc, '\n'.join(lines))
+        return h.really_unicode(self.table_tmpl % (adesc, bdesc, '\n'.join(lines)))

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/bc4c5649/Allura/allura/tests/test_diff.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tests/test_diff.py b/Allura/allura/tests/test_diff.py
index 20f1859..67c0807 100644
--- a/Allura/allura/tests/test_diff.py
+++ b/Allura/allura/tests/test_diff.py
@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
 #       Licensed to the Apache Software Foundation (ASF) under one
 #       or more contributor license agreements.  See the NOTICE file
 #       distributed with this work for additional information
@@ -137,3 +138,9 @@ class TestHtmlSideBySideDiff(unittest.TestCase):
 '''.strip()
         html = self.diff.make_table(a, b, 'file a', 'file b')
         self.assertEquals(html, expected)
+
+    def test_unicode_make_table(self):
+        a = ['строка']
+        b = ['измененная строка']
+        html = self.diff.make_table(a, b, 'file a', 'file b')
+        assert u'строка' in html