James Moger
2013-06-12 67439a1521ed82aa19c38c2c3cc54e8d6f74afe5
src/main/java/com/gitblit/wicket/panels/RefsPanel.java
@@ -22,26 +22,26 @@
import java.util.Map;
import org.apache.wicket.Component;
import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.panel.Panel;
import org.apache.wicket.markup.repeater.Item;
import org.apache.wicket.markup.repeater.data.DataView;
import org.apache.wicket.markup.repeater.data.ListDataProvider;
import org.eclipse.jgit.lib.Constants;
import org.eclipse.jgit.lib.ObjectId;
import org.eclipse.jgit.revwalk.RevCommit;
import com.gitblit.Constants;
import com.gitblit.models.RefModel;
import com.gitblit.wicket.WicketUtils;
import com.gitblit.wicket.pages.CommitPage;
import com.gitblit.wicket.pages.LogPage;
import com.gitblit.wicket.pages.RepositoryPage;
import com.gitblit.wicket.pages.TagPage;
public class RefsPanel extends Panel {
   private static final long serialVersionUID = 1L;
   public RefsPanel(String id, final String repositoryName, RevCommit c,
         Map<ObjectId, List<RefModel>> refs) {
      this(id, repositoryName, refs.get(c.getId()));
@@ -97,7 +97,7 @@
            String name = entry.displayName;
            String objectid = entry.getReferencedObjectId().getName();
            boolean breakLine = false;
            Class<? extends RepositoryPage> linkClass = CommitPage.class;
            Class<? extends WebPage> linkClass = CommitPage.class;
            String cssClass = "";
            if (name.startsWith(Constants.R_HEADS)) {
               // local branch
@@ -108,6 +108,18 @@
               // local head
               linkClass = LogPage.class;
               cssClass = "headRef";
            } else if (name.startsWith(Constants.R_CHANGES)) {
               // Gerrit change ref
               name = name.substring(Constants.R_CHANGES.length());
               cssClass = "otherRef";
            } else if (name.startsWith(Constants.R_PULL)) {
               // Pull Request ref
               name = "pull #" + name.substring(Constants.R_PULL.length());
               if (name.endsWith("/head")) {
                  // strip pull request head from name
                  name = name.substring(0, name.length() - "/head".length());
               }
               cssClass = "pullRef";
            } else if (name.startsWith(Constants.R_REMOTES)) {
               // remote branch
               linkClass = LogPage.class;