James Moger
2014-02-28 15e5605a902a9292b3d9008375347d076514711b
Fix regression in blame page due to issue-2, pull request #125
2 files modified
7 ■■■■ changed files
src/main/java/com/gitblit/wicket/pages/BlamePage.html 2 ●●● patch | view | raw | blame | history
src/main/java/com/gitblit/wicket/pages/BlamePage.java 5 ●●●● patch | view | raw | blame | history
src/main/java/com/gitblit/wicket/pages/BlamePage.html
@@ -30,7 +30,7 @@
                    </span>
                </td>
            </tr>
            <tr wicket:id="blameView">
            <tr wicket:id="annotation">
                <td class="lineCommit"><span class="sha1" wicket:id="commit"></span></td>
                <td class="lineNumber"><span class="sha1" wicket:id="line"></span></td>
                <td class="lineContent sha1" wicket:id="data"></td>
src/main/java/com/gitblit/wicket/pages/BlamePage.java
@@ -147,6 +147,9 @@
        }
        if (pathModel == null) {
            final String notFound = MessageFormat.format("Blame page failed to find {0} in {1} @ {2}",
                    blobPath, repositoryName, objectId);
            logger.error(notFound);
            add(new Label("annotation").setVisible(false));
            add(new Label("missingBlob", missingBlob(blobPath, commit)).setEscapeModelStrings(false));
            return;
@@ -157,7 +160,7 @@
        List<AnnotatedLine> lines = DiffUtils.blame(getRepository(), blobPath, objectId);
        final Map<?, String> colorMap = initializeColors(activeBlameType, lines);
        ListDataProvider<AnnotatedLine> blameDp = new ListDataProvider<AnnotatedLine>(lines);
        DataView<AnnotatedLine> blameView = new DataView<AnnotatedLine>("blameView", blameDp) {
        DataView<AnnotatedLine> blameView = new DataView<AnnotatedLine>("annotation", blameDp) {
            private static final long serialVersionUID = 1L;
            private String lastCommitId = "";
            private boolean showInitials = true;