James Moger
2013-11-19 5200b359257c2ab5e29781c2b05c6092fc8338f8
src/main/java/com/gitblit/wicket/pages/BlamePage.java
@@ -30,7 +30,6 @@
import org.eclipse.jgit.lib.ObjectId;
import org.eclipse.jgit.revwalk.RevCommit;
import com.gitblit.GitBlit;
import com.gitblit.Keys;
import com.gitblit.models.AnnotatedLine;
import com.gitblit.models.PathModel;
@@ -71,11 +70,11 @@
      add(new PathBreadcrumbsPanel("breadcrumbs", repositoryName, blobPath, objectId));
      String format = GitBlit.getString(Keys.web.datetimestampLongFormat,
      String format = app().settings().getString(Keys.web.datetimestampLongFormat,
            "EEEE, MMMM d, yyyy HH:mm Z");
      final DateFormat df = new SimpleDateFormat(format);
      df.setTimeZone(getTimeZone());
      PathModel pathModel = null;
      List<PathModel> paths = JGitUtils.getFilesInPath(getRepository(), StringUtils.getRootPath(blobPath), commit);
      for (PathModel path : paths) {
@@ -84,15 +83,15 @@
            break;
         }
      }
      if (pathModel == null) {
         add(new Label("annotation").setVisible(false));
         add(new Label("missingBlob", missingBlob(blobPath, commit)).setEscapeModelStrings(false));
         return;
      }
      add(new Label("missingBlob").setVisible(false));
      List<AnnotatedLine> lines = DiffUtils.blame(getRepository(), blobPath, objectId);
      ListDataProvider<AnnotatedLine> blameDp = new ListDataProvider<AnnotatedLine>(lines);
      DataView<AnnotatedLine> blameView = new DataView<AnnotatedLine>("annotation", blameDp) {
@@ -102,6 +101,7 @@
         private boolean showInitials = true;
         private String zeroId = ObjectId.zeroId().getName();
         @Override
         public void populateItem(final Item<AnnotatedLine> item) {
            AnnotatedLine entry = item.getModelObject();
            item.add(new Label("line", "" + entry.lineNumber));
@@ -157,12 +157,12 @@
   protected String getPageName() {
      return getString("gb.blame");
   }
   @Override
   protected Class<? extends BasePage> getRepoNavPageClass() {
      return TreePage.class;
   }
   protected String missingBlob(String blobPath, RevCommit commit) {
      StringBuilder sb = new StringBuilder();
      sb.append("<div class=\"alert alert-error\">");