You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by he...@apache.org on 2015/07/27 22:20:30 UTC
[22/22] allura git commit: [#7925] Update commit web view to show
copied and renamed changes
[#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/7d57e2db
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/7d57e2db
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/7d57e2db
Branch: refs/heads/hs/7925
Commit: 7d57e2db8ab895e32802d6b258f64770bea713d2
Parents: 0e4847a
Author: Heith Seewald <hs...@slashdotmedia.com>
Authored: Mon Jul 27 16:11:50 2015 -0400
Committer: Heith Seewald <hs...@slashdotmedia.com>
Committed: Mon Jul 27 16:11:50 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/7d57e2db/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/7d57e2db/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