incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject git commit: [#5752] ticket:294 fix commit refs in diff template for image diffs
Date Wed, 13 Mar 2013 16:31:23 GMT
Updated Branches:
  refs/heads/master 1b4ce947c -> 0e7d7f613


[#5752] ticket:294 fix commit refs in diff template for image diffs


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

Branch: refs/heads/master
Commit: 0e7d7f61394ee7b223fd5188a651ab74a12ad4db
Parents: 1b4ce94
Author: Yuriy Arhipov <yuriyarhipovua@yandex.ru>
Authored: Mon Mar 11 11:16:01 2013 +0400
Committer: Dave Brondsema <dbrondsema@geek.net>
Committed: Wed Mar 13 16:30:29 2013 +0000

----------------------------------------------------------------------
 Allura/allura/templates/repo/barediff.html         |    8 ++--
 Allura/allura/templates/repo/diff.html             |    8 ++--
 .../2c/e83a24e52c21e8d2146b1a04a20717c0bb08d7      |    2 +
 .../4d/a92902b500ae6b74b8e6dea9639ebfde6a007f      |  Bin 0 -> 158 bytes
 .../82/ac89a3fa20831c99faa54331fdce563df45dc8      |  Bin 0 -> 794 bytes
 .../8d/27123659c0022b0a4a7b10f4d1fe03800a1c8c      |  Bin 0 -> 158 bytes
 .../d9/61abbbf10341ee18a668c975842c35cfc0bef2      |    1 +
 .../e1/db0418f7fe2c16e9a57b50196e6ff25c2089ca      |  Bin 0 -> 415 bytes
 .../tests/data/testmime.git/refs/heads/master      |    2 +-
 .../forgegit/tests/functional/test_controllers.py  |   29 +++++++++++++++
 10 files changed, 41 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/0e7d7f61/Allura/allura/templates/repo/barediff.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/repo/barediff.html b/Allura/allura/templates/repo/barediff.html
index 4dfce67..24d8b48 100644
--- a/Allura/allura/templates/repo/barediff.html
+++ b/Allura/allura/templates/repo/barediff.html
@@ -1,10 +1,10 @@
 {% if a.has_image_view and b.has_image_view %}
   <img src="{{a.url()}}?format=raw"
-       alt="{{h.text.truncate(a._commit._id, 10)}}"
-       title="{{h.text.truncate(a._commit._id, 10)}}"/>
+       alt="{{h.text.truncate(a.commit._id, 10)}}"
+       title="{{h.text.truncate(a.commit._id, 10)}}"/>
   <img src="{{b.url()}}?format=raw"
-       alt="{{h.text.truncate(b._commit._id, 10)}}"
-       title="{{h.text.truncate(b._commit._id, 10)}}"/>
+       alt="{{h.text.truncate(b.commit._id, 10)}}"
+       title="{{h.text.truncate(b.commit._id, 10)}}"/>
 {% else %}
   {% if session.diformat == 'sidebyside' %}
     {{diff|safe}}

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/0e7d7f61/Allura/allura/templates/repo/diff.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/repo/diff.html b/Allura/allura/templates/repo/diff.html
index 4c5ba93..8f83ef8 100644
--- a/Allura/allura/templates/repo/diff.html
+++ b/Allura/allura/templates/repo/diff.html
@@ -21,11 +21,11 @@
   {% if a.has_image_view and b.has_image_view %}
   <div class="grid-19">
     <img src="{{a.url()}}?format=raw"
-         alt="{{h.text.truncate(a._commit._id, 10)}}"
-         title="{{h.text.truncate(a._commit._id, 10)}}"/>
+         alt="{{h.text.truncate(a.commit._id, 10)}}"
+         title="{{h.text.truncate(a.commit._id, 10)}}"/>
     <img src="{{b.url()}}?format=raw"
-         alt="{{h.text.truncate(b._commit._id, 10)}}"
-         title="{{h.text.truncate(b._commit._id, 10)}}"/>
+         alt="{{h.text.truncate(b.commit._id, 10)}}"
+         title="{{h.text.truncate(b.commit._id, 10)}}"/>
   </div>
   {% else %}
   <div class="clip grid-19">

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/0e7d7f61/ForgeGit/forgegit/tests/data/testmime.git/objects/2c/e83a24e52c21e8d2146b1a04a20717c0bb08d7
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/tests/data/testmime.git/objects/2c/e83a24e52c21e8d2146b1a04a20717c0bb08d7
b/ForgeGit/forgegit/tests/data/testmime.git/objects/2c/e83a24e52c21e8d2146b1a04a20717c0bb08d7
new file mode 100644
index 0000000..76d9ad8
--- /dev/null
+++ b/ForgeGit/forgegit/tests/data/testmime.git/objects/2c/e83a24e52c21e8d2146b1a04a20717c0bb08d7
@@ -0,0 +1,2 @@
+x��An�0EY����fl�I$��ct9��!�q���z�.��}�/�4�6t�VUaH�'�B7
+���s	�O�݀�$�������ˢ���#r�_���Ǟ���D.^�u��ֲ�W��e����B���?7�'�=���c�{��=��wi��lN
�t���4}4`���Tr�yZn��<JVq
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/0e7d7f61/ForgeGit/forgegit/tests/data/testmime.git/objects/4d/a92902b500ae6b74b8e6dea9639ebfde6a007f
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/tests/data/testmime.git/objects/4d/a92902b500ae6b74b8e6dea9639ebfde6a007f
b/ForgeGit/forgegit/tests/data/testmime.git/objects/4d/a92902b500ae6b74b8e6dea9639ebfde6a007f
new file mode 100644
index 0000000..ff64d9f
Binary files /dev/null and b/ForgeGit/forgegit/tests/data/testmime.git/objects/4d/a92902b500ae6b74b8e6dea9639ebfde6a007f
differ

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/0e7d7f61/ForgeGit/forgegit/tests/data/testmime.git/objects/82/ac89a3fa20831c99faa54331fdce563df45dc8
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/tests/data/testmime.git/objects/82/ac89a3fa20831c99faa54331fdce563df45dc8
b/ForgeGit/forgegit/tests/data/testmime.git/objects/82/ac89a3fa20831c99faa54331fdce563df45dc8
new file mode 100644
index 0000000..802cdcb
Binary files /dev/null and b/ForgeGit/forgegit/tests/data/testmime.git/objects/82/ac89a3fa20831c99faa54331fdce563df45dc8
differ

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/0e7d7f61/ForgeGit/forgegit/tests/data/testmime.git/objects/8d/27123659c0022b0a4a7b10f4d1fe03800a1c8c
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/tests/data/testmime.git/objects/8d/27123659c0022b0a4a7b10f4d1fe03800a1c8c
b/ForgeGit/forgegit/tests/data/testmime.git/objects/8d/27123659c0022b0a4a7b10f4d1fe03800a1c8c
new file mode 100644
index 0000000..a08d240
Binary files /dev/null and b/ForgeGit/forgegit/tests/data/testmime.git/objects/8d/27123659c0022b0a4a7b10f4d1fe03800a1c8c
differ

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/0e7d7f61/ForgeGit/forgegit/tests/data/testmime.git/objects/d9/61abbbf10341ee18a668c975842c35cfc0bef2
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/tests/data/testmime.git/objects/d9/61abbbf10341ee18a668c975842c35cfc0bef2
b/ForgeGit/forgegit/tests/data/testmime.git/objects/d9/61abbbf10341ee18a668c975842c35cfc0bef2
new file mode 100644
index 0000000..9a8f0e9
--- /dev/null
+++ b/ForgeGit/forgegit/tests/data/testmime.git/objects/d9/61abbbf10341ee18a668c975842c35cfc0bef2
@@ -0,0 +1 @@
+x��KN�0g�S�i��8�H#�`ٶ�K������	p�Y֢��u�k��қ�́RYlt&z�Y8�!H,Y,#��6n��b?0)��I5�aB�]��g�x����co���6�m�����O;��d�����`)��G�4�*��vyfC����@��PΚ.���%�RN��wQ?nnX�
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/0e7d7f61/ForgeGit/forgegit/tests/data/testmime.git/objects/e1/db0418f7fe2c16e9a57b50196e6ff25c2089ca
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/tests/data/testmime.git/objects/e1/db0418f7fe2c16e9a57b50196e6ff25c2089ca
b/ForgeGit/forgegit/tests/data/testmime.git/objects/e1/db0418f7fe2c16e9a57b50196e6ff25c2089ca
new file mode 100644
index 0000000..62cab6a
Binary files /dev/null and b/ForgeGit/forgegit/tests/data/testmime.git/objects/e1/db0418f7fe2c16e9a57b50196e6ff25c2089ca
differ

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/0e7d7f61/ForgeGit/forgegit/tests/data/testmime.git/refs/heads/master
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/tests/data/testmime.git/refs/heads/master b/ForgeGit/forgegit/tests/data/testmime.git/refs/heads/master
index 5a06233..7e6b3d7 100644
--- a/ForgeGit/forgegit/tests/data/testmime.git/refs/heads/master
+++ b/ForgeGit/forgegit/tests/data/testmime.git/refs/heads/master
@@ -1 +1 @@
-6060fc5fce84b93113ba659c2c64971e134cd136
+d961abbbf10341ee18a668c975842c35cfc0bef2

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/0e7d7f61/ForgeGit/forgegit/tests/functional/test_controllers.py
----------------------------------------------------------------------
diff --git a/ForgeGit/forgegit/tests/functional/test_controllers.py b/ForgeGit/forgegit/tests/functional/test_controllers.py
index 7dcb88c..930df8b 100644
--- a/ForgeGit/forgegit/tests/functional/test_controllers.py
+++ b/ForgeGit/forgegit/tests/functional/test_controllers.py
@@ -387,3 +387,32 @@ class TestFork(_TestCase):
         r = self.app.post('/p/test/src-git/merge-requests/%s/save' % mr_num,
                           params=dict(status='rejected')).follow()
         assert 'Merge Request #%s:  (rejected)' % mr_num in r, r
+
+class TestDiff(TestController):
+
+    def setUp(self):
+        super(TestDiff, self).setUp()
+        self.setup_with_tools()
+
+    @with_git
+    def setup_with_tools(self):
+        h.set_context('test', 'src-git', neighborhood='Projects')
+        repo_dir = pkg_resources.resource_filename(
+            'forgegit', 'tests/data')
+        c.app.repo.fs_path = repo_dir
+        c.app.repo.status = 'ready'
+        c.app.repo.name = 'testmime.git'
+        ThreadLocalORMSession.flush_all()
+        h.set_context('test', 'src-git', neighborhood='Projects')
+        c.app.repo.refresh()
+        ThreadLocalORMSession.flush_all()
+
+    def test_diff(self):
+        r = self.app.get('/src-git/ci/d961abbbf10341ee18a668c975842c35cfc0bef2/tree/1.png?barediff=2ce83a24e52c21e8d2146b1a04a20717c0bb08d7')
+        assert 'alt="2ce83a2..."' in r
+        assert 'alt="d961abb..."' in r
+
+        r = self.app.get('/src-git/ci/d961abbbf10341ee18a668c975842c35cfc0bef2/tree/1.png?diff=2ce83a24e52c21e8d2146b1a04a20717c0bb08d7')
+        assert 'alt="2ce83a2..."' in r
+        assert 'alt="d961abb..."' in r
+


Mime
View raw message