James Moger
2011-11-10 4eb1d83ac51f9b0a8813e7c1ed8e106e37c18562
Prefix RSS tags with type information. Include commit id and parents.
1 files modified
20 ■■■■ changed files
src/com/gitblit/SyndicationServlet.java 20 ●●●● patch | view | raw | blame | history
src/com/gitblit/SyndicationServlet.java
@@ -190,18 +190,26 @@
                    StringUtils.encodeURL(model.name), commit.getName());
            entry.published = commit.getCommitterIdent().getWhen();
            entry.contentType = "text/html";
            String message = GitBlit.self().processCommitMessage(model.name, commit.getFullMessage());
            String message = GitBlit.self().processCommitMessage(model.name,
                    commit.getFullMessage());
            entry.content = message;
            entry.repository = model.name;
            entry.branch = objectId;
            entry.branch = objectId;
            entry.tags = new ArrayList<String>();
            // add commit id and parent commit ids
            entry.tags.add("commit:" + commit.getName());
            for (RevCommit parent : commit.getParents()) {
                entry.tags.add("parent:" + parent.getName());
            }
            // add refs to tabs list
            List<RefModel> refs = allRefs.get(commit.getId());
            if (refs != null && refs.size() > 0) {
                List<String> tags = new ArrayList<String>();
                for (RefModel ref : refs) {
                    tags.add(ref.getName());
                    entry.tags.add("ref:" + ref.getName());
                }
                entry.tags = tags;
            }
            }
            entries.add(entry);
        }
        String feedLink;