]> source.dussan.org Git - gitblit.git/commitdiff
Eliminate problematic HEAD links from the blob, blame, and tree pages
authorJames Moger <james.moger@gitblit.com>
Mon, 3 Mar 2014 22:02:52 +0000 (17:02 -0500)
committerJames Moger <james.moger@gitblit.com>
Mon, 3 Mar 2014 22:02:52 +0000 (17:02 -0500)
releases.moxie
src/main/java/com/gitblit/wicket/pages/BlamePage.html
src/main/java/com/gitblit/wicket/pages/BlamePage.java
src/main/java/com/gitblit/wicket/pages/BlobPage.html
src/main/java/com/gitblit/wicket/pages/BlobPage.java
src/main/java/com/gitblit/wicket/pages/TreePage.html
src/main/java/com/gitblit/wicket/pages/TreePage.java

index 7bdd2f0b961236c3abe2a39cd670e44532c42079..cd4e43eaa76cd02c9898a4443adbb9071f8fafef 100644 (file)
@@ -52,6 +52,7 @@ r20: {
        - Retrieve LDAP groups with dereferencing aliases (pr-122)
        - Revised committer verification to require a matching displayname or account name AND the email address
        - Serve repositories on both /r and /git, displaying /r because it is shorter
+       - Eliminate HEAD from the blob, blame, and tree pages. That assumed a resource was available in HEAD and it may not be.
     additions:
        - Added color modes for the blame page (issue-2)
        - Added an optional MirrorService which will periodically fetch ref updates from source repositories for mirrors (issue-5).  Repositories must be manually cloned using native git and "--mirror".
index 1da9671b4eb417fdc07222f2bb11b5459fb7b1a6..126c337a2fdf774ed244f33de4ee3701963ecb82 100644 (file)
@@ -9,7 +9,7 @@
        \r
        <!-- blame nav links -->        \r
        <div class="page_nav2">\r
-               <a wicket:id="blobLink"><wicket:message key="gb.view"></wicket:message></a> | <a wicket:id="historyLink"><wicket:message key="gb.history"></wicket:message></a> | <a wicket:id="headLink"><wicket:message key="gb.head"></wicket:message></a> | <a wicket:id="commitLink"><wicket:message key="gb.commit"></wicket:message></a> | <a wicket:id="commitDiffLink"><wicket:message key="gb.commitdiff"></wicket:message></a>\r
+               <a wicket:id="blobLink"><wicket:message key="gb.view"></wicket:message></a> | <a wicket:id="historyLink"><wicket:message key="gb.history"></wicket:message></a> | <a wicket:id="commitLink"><wicket:message key="gb.commit"></wicket:message></a> | <a wicket:id="commitDiffLink"><wicket:message key="gb.commitdiff"></wicket:message></a>\r
        </div>  \r
        \r
        <!-- commit header -->\r
index ae85c4338ea20e4d39ecf93f3953b47f3f7b1fda..c2280a2e4b568db9ba33f93ae575f9d623415f86 100644 (file)
@@ -35,7 +35,6 @@ import org.apache.wicket.markup.html.link.BookmarkablePageLink;
 import org.apache.wicket.markup.repeater.Item;\r
 import org.apache.wicket.markup.repeater.data.DataView;\r
 import org.apache.wicket.markup.repeater.data.ListDataProvider;\r
-import org.eclipse.jgit.lib.Constants;\r
 import org.eclipse.jgit.lib.ObjectId;\r
 import org.eclipse.jgit.revwalk.RevCommit;\r
 \r
@@ -103,8 +102,6 @@ public class BlamePage extends RepositoryPage {
                                WicketUtils.newObjectParameter(repositoryName, objectId)));\r
 \r
                // blame page links\r
-               add(new BookmarkablePageLink<Void>("headLink", BlamePage.class,\r
-                               WicketUtils.newPathParameter(repositoryName, Constants.HEAD, blobPath)));\r
                add(new BookmarkablePageLink<Void>("historyLink", HistoryPage.class,\r
                                WicketUtils.newPathParameter(repositoryName, objectId, blobPath)));\r
 \r
index d45e3c3b11c586434dfc3b2a279332e5e48022e0..3f9a959a8bc435c808d9bb40d7c909fa63b06569 100644 (file)
@@ -46,7 +46,7 @@
 \r
                <!-- blob nav links --> \r
                <div class="page_nav2">\r
-                       <a wicket:id="blameLink"><wicket:message key="gb.blame"></wicket:message></a> | <a wicket:id="historyLink"><wicket:message key="gb.history"></wicket:message></a> | <a wicket:id="rawLink"><wicket:message key="gb.raw"></wicket:message></a> | <a wicket:id="headLink"><wicket:message key="gb.head"></wicket:message></a>\r
+                       <a wicket:id="blameLink"><wicket:message key="gb.blame"></wicket:message></a> | <a wicket:id="historyLink"><wicket:message key="gb.history"></wicket:message></a> | <a wicket:id="rawLink"><wicket:message key="gb.raw"></wicket:message></a>\r
                </div>  \r
        \r
                <!-- commit header -->\r
index 6c73ec10723e652df28d71913f95e87b2c9a9bdb..299d8dbc078ea2b320f0c00b92c0fe196396f478 100644 (file)
@@ -24,7 +24,6 @@ import org.apache.wicket.PageParameters;
 import org.apache.wicket.markup.html.basic.Label;\r
 import org.apache.wicket.markup.html.image.Image;\r
 import org.apache.wicket.markup.html.link.BookmarkablePageLink;\r
-import org.eclipse.jgit.lib.Constants;\r
 import org.eclipse.jgit.lib.Repository;\r
 import org.eclipse.jgit.revwalk.RevCommit;\r
 \r
@@ -60,7 +59,6 @@ public class BlobPage extends RepositoryPage {
                        add(new BookmarkablePageLink<Void>("historyLink", HistoryPage.class).setEnabled(false));\r
                        add(new BookmarkablePageLink<Void>("rawLink", RawPage.class,\r
                                        WicketUtils.newPathParameter(repositoryName, objectId, blobPath)));\r
-                       add(new BookmarkablePageLink<Void>("headLink", BlobPage.class).setEnabled(false));\r
                        add(new CommitHeaderPanel("commitHeader", objectId));\r
                        add(new PathBreadcrumbsPanel("breadcrumbs", repositoryName, blobPath, objectId));\r
                        Component c = new Label("blobText", JGitUtils.getStringContent(r, objectId, encodings));\r
@@ -91,8 +89,6 @@ public class BlobPage extends RepositoryPage {
                                        WicketUtils.newPathParameter(repositoryName, objectId, blobPath)));\r
                        add(new BookmarkablePageLink<Void>("rawLink", RawPage.class,\r
                                        WicketUtils.newPathParameter(repositoryName, objectId, blobPath)));\r
-                       add(new BookmarkablePageLink<Void>("headLink", BlobPage.class,\r
-                                       WicketUtils.newPathParameter(repositoryName, Constants.HEAD, blobPath)));\r
 \r
                        add(new CommitHeaderPanel("commitHeader", repositoryName, commit));\r
 \r
index 282e28f81bec0c787662092c72d97009c451cf45..51a996fff33124ea546d949424448b44605ef142 100644 (file)
@@ -9,7 +9,7 @@
 \r
        <!-- blob nav links --> \r
        <div class="page_nav2">\r
-               <a wicket:id="historyLink"><wicket:message key="gb.history"></wicket:message></a> | <a wicket:id="headLink"><wicket:message key="gb.head"></wicket:message></a> | <span wicket:id="compressedLinks"></span>\r
+               <a wicket:id="historyLink"><wicket:message key="gb.history"></wicket:message></a> | <span wicket:id="compressedLinks"></span>\r
        </div>  \r
        \r
        <!-- commit header -->\r
index df6507f592ae040a5c9f5a0c2eed0744c7245723..d6bf1fe151e560583873486332e4dc5eb0c63874 100644 (file)
@@ -24,7 +24,6 @@ import org.apache.wicket.markup.html.panel.Fragment;
 import org.apache.wicket.markup.repeater.Item;\r
 import org.apache.wicket.markup.repeater.data.DataView;\r
 import org.apache.wicket.markup.repeater.data.ListDataProvider;\r
-import org.eclipse.jgit.lib.Constants;\r
 import org.eclipse.jgit.lib.FileMode;\r
 import org.eclipse.jgit.lib.Repository;\r
 import org.eclipse.jgit.revwalk.RevCommit;\r
@@ -56,8 +55,6 @@ public class TreePage extends RepositoryPage {
                // tree page links\r
                add(new BookmarkablePageLink<Void>("historyLink", HistoryPage.class,\r
                                WicketUtils.newPathParameter(repositoryName, objectId, path)));\r
-               add(new BookmarkablePageLink<Void>("headLink", TreePage.class,\r
-                               WicketUtils.newPathParameter(repositoryName, Constants.HEAD, path)));\r
                add(new CompressedDownloadsPanel("compressedLinks", getRequest()\r
                                .getRelativePathPrefixToContextRoot(), repositoryName, objectId, path));\r
 \r