From 9ae72a95a2eae7f5483b30bea627af8f2f2f8330 Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Wed, 14 Mar 2012 16:20:29 -0400
Subject: [PATCH] Wrapped activity page charts with table due to GoogleCharts update :(
---
src/com/gitblit/utils/JGitUtils.java | 17 +++++++++++++++--
1 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/src/com/gitblit/utils/JGitUtils.java b/src/com/gitblit/utils/JGitUtils.java
index 5f193d0..c39ab71 100644
--- a/src/com/gitblit/utils/JGitUtils.java
+++ b/src/com/gitblit/utils/JGitUtils.java
@@ -1453,10 +1453,23 @@
List<RefModel> noteBranches = getNoteBranches(repository, true, -1);
for (RefModel notesRef : noteBranches) {
RevTree notesTree = JGitUtils.getCommit(repository, notesRef.getName()).getTree();
+ // flat notes list
+ String notePath = commit.getName();
+ String text = getStringContent(repository, notesTree, notePath);
+ if (!StringUtils.isEmpty(text)) {
+ List<RevCommit> history = getRevLog(repository, notesRef.getName(), notePath, 0, -1);
+ RefModel noteRef = new RefModel(notesRef.displayName, null, history.get(history
+ .size() - 1));
+ GitNote gitNote = new GitNote(noteRef, text);
+ list.add(gitNote);
+ continue;
+ }
+
+ // folder structure
StringBuilder sb = new StringBuilder(commit.getName());
sb.insert(2, '/');
- String notePath = sb.toString();
- String text = getStringContent(repository, notesTree, notePath);
+ notePath = sb.toString();
+ text = getStringContent(repository, notesTree, notePath);
if (!StringUtils.isEmpty(text)) {
List<RevCommit> history = getRevLog(repository, notesRef.getName(), notePath, 0, -1);
RefModel noteRef = new RefModel(notesRef.displayName, null, history.get(history
--
Gitblit v1.9.1