allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jetm...@apache.org
Subject [23/50] allura git commit: [#7925] Update commit web view to show copied and renamed changes
Date Thu, 13 Aug 2015 18:06:50 GMT
[#7925] Update commit web view to show copied and renamed changes


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

Branch: refs/heads/ib/7922
Commit: 73385a88dd6bc36adc4e1f8716b1fb3a621662bc
Parents: 04b87c6
Author: Heith Seewald <hseewald@slashdotmedia.com>
Authored: Mon Jul 27 16:11:50 2015 -0400
Committer: Heith Seewald <hseewald@slashdotmedia.com>
Committed: Mon Aug 10 09:38:36 2015 -0400

----------------------------------------------------------------------
 Allura/allura/controllers/repository.py  | 4 ++--
 Allura/allura/templates/repo/commit.html | 5 +++++
 2 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/73385a88/Allura/allura/controllers/repository.py
----------------------------------------------------------------------
diff --git a/Allura/allura/controllers/repository.py b/Allura/allura/controllers/repository.py
index 5d03f64..0524589 100644
--- a/Allura/allura/controllers/repository.py
+++ b/Allura/allura/controllers/repository.py
@@ -565,8 +565,8 @@ class CommitBrowser(BaseController):
         diffs = self._commit.paged_diffs(start=start, end=start + limit)
         result['artifacts'] = [
             (t, f, 'blob' if tree.get_blob_by_path(f) else 'tree',
-            tree.get_blob_by_path(f) and tree.get_blob_by_path(f).is_text)
-            for t in ('added', 'removed', 'changed', 'copied')
+            tree.get_blob_by_path(f) and tree.get_blob_by_path(f).has_html_view)
+            for t in ('added', 'removed', 'changed', 'copied', 'renamed')
             for f in diffs[t]]
         count = diffs['total']
         result.update(dict(page=page, limit=limit, count=count))

http://git-wip-us.apache.org/repos/asf/allura/blob/73385a88/Allura/allura/templates/repo/commit.html
----------------------------------------------------------------------
diff --git a/Allura/allura/templates/repo/commit.html b/Allura/allura/templates/repo/commit.html
index f029f52..f7206d4 100644
--- a/Allura/allura/templates/repo/commit.html
+++ b/Allura/allura/templates/repo/commit.html
@@ -1,3 +1,4 @@
+
 {#-
        Licensed to the Apache Software Foundation (ASF) under one
        or more contributor license agreements.  See the NOTICE file
@@ -119,6 +120,8 @@ Commit <a href="{{commit.url()}}">{{commit.shorthand_id()}}</a>
{{commit_labels(
         <td><a href="#diff-{{loop.index}}">
             {% if type == 'copied' %}
               {{ '%s -> %s' % (h.really_unicode(file.old), h.really_unicode(file.new))
}}
+            {% elif type == 'renamed' %}
+              {{ '%s -> %s' % (h.really_unicode(file.old), h.really_unicode(file.new))
}}
             {% else %}
               {{h.really_unicode(file)}}
             {% endif %}
@@ -142,6 +145,8 @@ Commit <a href="{{commit.url()}}">{{commit.shorthand_id()}}</a>
{{commit_labels(
                 {% endif %}
             {% elif type == 'removed' %}
                 <a href="{{prev[0].url()}}tree/{{h.urlquote(h.really_unicode(file))}}">{{h.really_unicode(file)}}</a>
+            {% elif type == 'renamed' %}
+                <a href="{{prev[0].url()}}tree/{{h.urlquote(h.really_unicode(file))}}">{{h.really_unicode(file)}}</a>
             {% elif type == 'copied' %}
                 <a href="{{prev[0].url()}}tree/{{h.urlquote(h.really_unicode(file.old))}}">{{h.really_unicode(file.old)}}</a>
                 to


Mime
View raw message