]> source.dussan.org Git - gitblit.git/commitdiff
Fix regression in blame page due to issue-2, pr-125
authorJames Moger <james.moger@gitblit.com>
Fri, 28 Feb 2014 15:54:43 +0000 (10:54 -0500)
committerJames Moger <james.moger@gitblit.com>
Fri, 28 Feb 2014 16:25:55 +0000 (11:25 -0500)
src/main/java/com/gitblit/wicket/pages/BlamePage.html
src/main/java/com/gitblit/wicket/pages/BlamePage.java

index ffd2a03b3b10d89f52715deff7cf44b252afbca6..1da9671b4eb417fdc07222f2bb11b5459fb7b1a6 100644 (file)
@@ -30,7 +30,7 @@
                                        </span>\r
                                </td>\r
                        </tr>\r
-                       <tr wicket:id="blameView">\r
+                       <tr wicket:id="annotation">\r
                                <td class="lineCommit"><span class="sha1" wicket:id="commit"></span></td>\r
                                <td class="lineNumber"><span class="sha1" wicket:id="line"></span></td>\r
                                <td class="lineContent sha1" wicket:id="data"></td>\r
index ef023b759d9421d8d48677c07b5b278ad04f70f8..ae85c4338ea20e4d39ecf93f3953b47f3f7b1fda 100644 (file)
@@ -147,6 +147,9 @@ public class BlamePage extends RepositoryPage {
                }\r
 \r
                if (pathModel == null) {\r
+                       final String notFound = MessageFormat.format("Blame page failed to find {0} in {1} @ {2}",\r
+                                       blobPath, repositoryName, objectId);\r
+                       logger.error(notFound);\r
                        add(new Label("annotation").setVisible(false));\r
                        add(new Label("missingBlob", missingBlob(blobPath, commit)).setEscapeModelStrings(false));\r
                        return;\r
@@ -157,7 +160,7 @@ public class BlamePage extends RepositoryPage {
                List<AnnotatedLine> lines = DiffUtils.blame(getRepository(), blobPath, objectId);\r
                final Map<?, String> colorMap = initializeColors(activeBlameType, lines);\r
                ListDataProvider<AnnotatedLine> blameDp = new ListDataProvider<AnnotatedLine>(lines);\r
-               DataView<AnnotatedLine> blameView = new DataView<AnnotatedLine>("blameView", blameDp) {\r
+               DataView<AnnotatedLine> blameView = new DataView<AnnotatedLine>("annotation", blameDp) {\r
                        private static final long serialVersionUID = 1L;\r
                        private String lastCommitId = "";\r
                        private boolean showInitials = true;\r