incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tvansteenbu...@apache.org
Subject [24/50] [abbrv] git commit: [#5773] ticket:314 fixed filesize errors
Date Tue, 07 May 2013 22:28:58 GMT
[#5773] ticket:314 fixed filesize errors


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

Branch: refs/heads/tv/4321
Commit: 94b70cea70a115851b40446780efc17fc96222be
Parents: e14b56e
Author: Yuriy Arhipov <yuriyarhipovua@yandex.ru>
Authored: Fri Apr 19 17:11:58 2013 +0400
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Thu May 2 20:37:04 2013 +0000

----------------------------------------------------------------------
 Allura/allura/templates/widgets/repo/log.html      |   24 +++++---------
 .../forgegit/tests/functional/test_controllers.py  |    8 ++--
 2 files changed, 13 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/94b70cea/Allura/allura/templates/widgets/repo/log.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/widgets/repo/log.html b/Allura/allura/templates/widgets/repo/log.html
index 11fa918..086b0b3 100644
--- a/Allura/allura/templates/widgets/repo/log.html
+++ b/Allura/allura/templates/widgets/repo/log.html
@@ -34,12 +34,10 @@
         <tr class="rev">
           <td>
             <div class="grid-14">
+                {{g.markdown.convert(commit.message)}}
                 {%if is_file%}
-                <div class="grid-1"><input type="checkbox" class="revision" revision="{{commit._id.split(':')[-1]}}"
url_commit="{{commit.url()}}"></div>
+                    <div class="grid-1"><input type="checkbox" class="revision"
revision="{{commit._id.split(':')[-1]}}" url_commit="{{commit.url()}}"></div>
                 {%endif%}
-                {%for tag in c.app.repo.symbolics_for_commit(commit)[1]%}
-                        <a href="{{c.app.repo.url()}}ci/{{tag}}/tree{{request.params.get('path')}}">{{tag}}</a>
-                {%endfor%}
                 {% if commit.committed.email != commit.authored.email %}
                 {% if commit.committer_url %}
                 <a href="{{commit.committer_url}}">{{email_gravatar(commit.committed.email,
title=commit.committed.name, size=16)}}
@@ -51,21 +49,17 @@
                 {% endif %}
                 {% endif %}
                 <a href="{{commit.url()}}">{{commit.shorthand_id()}}</a>
+                {% if c.app.repo.symbolics_for_commit(commit)[1] %}
+                    ({% for tag in c.app.repo.symbolics_for_commit(commit)[1] -%}
+                        <a href="{{c.app.repo.url()}}ci/{{tag}}/tree{{request.params.get('path')}}">{{tag}}</a>{%
if not loop.last %}&nbsp;{% endif %}
+                    {%- endfor %})
+                {% endif %}
                 by
                 {{email_gravatar(commit.authored.email, title=commit.authored.name, size=16)}}
{{commit.authored.name}}
                 {%if is_file%}
-                    {%if request.params.get('path')[:1]=='/'%}
-                        {%set path = request.params.get('path')[1:]%}
-                    {%else%}
-                        {%set path = request.params.get('path')%}
-                    {%endif%}
-
-                    {{commit.tree.get_blob(path).size}} Bytes
+                    ({{commit.tree.get_obj_by_path(request.params.get('path')).size|filesizeformat}})
                 {%endif%}
             </div>
-            <div>
-              {{g.markdown.convert(commit.message)}}
-            </div>
           </td>
           <td style="vertical-align: text-top">
             {% if commit.committed.date %}{{commit.committed.date}}{% endif %}
@@ -80,7 +74,7 @@
             </a>
               {%if is_file%}
               <br/>
-              <a href="{{commit.url()}}tree{{request.params.get('path')}}?format=raw ">Download</a>
+              <a href="{{commit.url()}}tree{{request.params.get('path')}}?format=raw">Download</a>
               {%endif%}
           </td>
         </tr>

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/94b70cea/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 78ff5a9..d5c8365 100644
--- a/ForgeGit/forgegit/tests/functional/test_controllers.py
+++ b/ForgeGit/forgegit/tests/functional/test_controllers.py
@@ -111,14 +111,14 @@ class TestRootController(_TestCase):
         resp = self.app.get('/src-git/ci/1e146e67985dcd71c74de79613719bef7bddca4a/log/')
         assert 'Initial commit' in resp
         assert '<div class="markdown_content"><p>Change README</p></div>'
in resp
-        assert 'tree/README?format=raw ">Download</a>' not in resp
-        assert'28 Bytes' not in resp.html.find('td').contents[1].text
+        assert 'tree/README?format=raw">Download</a>' not in resp
+        assert '28 Bytes' not in resp.html.find('td').contents[1].text
         assert 'Tree' in resp.html.findAll('td')[2].text, resp.html.findAll('td')[2].text
         resp = self.app.get('/src-git/ci/1e146e67985dcd71c74de79613719bef7bddca4a/log/?path=/README')
-        assert'28 Bytes' in resp.html.find('td').contents[1].text
+        assert '28 Bytes' in resp.html.find('td').contents[1].text
         assert 'View' in resp.html.findAll('td')[2].text
         assert 'Change README' in resp
-        assert 'tree/README?format=raw ">Download</a>' in resp
+        assert 'tree/README?format=raw">Download</a>' in resp
         assert 'Add README' in resp
         assert "Initial commit " not in resp
         resp = self.app.get('/src-git/ci/1e146e67985dcd71c74de79613719bef7bddca4a/log/?path=/a/b/c/')


Mime
View raw message