]> source.dussan.org Git - gitblit.git/commitdiff
Eliminate the "enumerate documentation" repository setting
authorJames Moger <james.moger@gitblit.com>
Thu, 14 Nov 2013 23:10:42 +0000 (18:10 -0500)
committerJames Moger <james.moger@gitblit.com>
Thu, 14 Nov 2013 23:10:42 +0000 (18:10 -0500)
Change-Id: I3a7c13b4c626f8b5ea2a63717dfe4249c19eebb4

releases.moxie
src/main/java/com/gitblit/GitBlit.java
src/main/java/com/gitblit/client/EditRepositoryDialog.java
src/main/java/com/gitblit/client/IndicatorsRenderer.java
src/main/java/com/gitblit/models/RepositoryModel.java
src/main/java/com/gitblit/wicket/pages/EditRepositoryPage.html
src/main/java/com/gitblit/wicket/pages/EditRepositoryPage.java
src/main/java/com/gitblit/wicket/pages/RepositoryPage.java
src/test/java/com/gitblit/tests/GitBlitSuite.java

index d66dba668dc3f9e2296f5cef9cd29f2a9697efbc..73a10a6f0c74b658f6644e5f7ccf6f37279daa02 100644 (file)
@@ -30,6 +30,7 @@ r20: {
        - Determine best commit id (e.g. "master") for the tree and docs pages and use that in links
        - By default GO will now bind to all interfaces for both http and https connectors.  This simplifies setup for first-time users.        
        - Removed docs indicator on the repositories page
+       - Removed the repository setting to enable Markdown document enumeration, this is now automatic and expanded
     additions:
        - Added an optional MirrorExecutor which will periodically fetch ref updates from source repositories for mirrors (issue-5).  Repositories must be manually cloned using native git and "--mirror".
        - Added branch graph image servlet based on EGit's branch graph renderer (issue-194)
index a0e8b0a3236c7b3d00fe139e80bbe42b65cb326b..f191d6a661f0f6cd8abe223e401cabfba6bc291a 100644 (file)
@@ -2006,7 +2006,6 @@ public class GitBlit implements ServletContextListener {
                        model.description = getConfig(config, "description", "");
                        model.originRepository = getConfig(config, "originRepository", null);
                        model.addOwners(ArrayUtils.fromString(getConfig(config, "owner", "")));
-                       model.useDocs = getConfig(config, "useDocs", false);
                        model.useIncrementalPushTags = getConfig(config, "useIncrementalPushTags", false);
                        model.incrementalPushTagPrefix = getConfig(config, "incrementalPushTagPrefix", null);
                        model.allowForks = getConfig(config, "allowForks", true);
@@ -2566,7 +2565,6 @@ public class GitBlit implements ServletContextListener {
                config.setString(Constants.CONFIG_GITBLIT, null, "description", repository.description);
                config.setString(Constants.CONFIG_GITBLIT, null, "originRepository", repository.originRepository);
                config.setString(Constants.CONFIG_GITBLIT, null, "owner", ArrayUtils.toString(repository.owners));
-               config.setBoolean(Constants.CONFIG_GITBLIT, null, "useDocs", repository.useDocs);
                config.setBoolean(Constants.CONFIG_GITBLIT, null, "useIncrementalPushTags", repository.useIncrementalPushTags);
                if (StringUtils.isEmpty(repository.incrementalPushTagPrefix) ||
                                repository.incrementalPushTagPrefix.equals(settings.getString(Keys.git.defaultIncrementalPushTagPrefix, "r"))) {
index 1c499ee12010ae05951ff489c321a4ead5ec4d52..ab5a74a2cfaa19e935ffe8da465f7602db22f2dd 100644 (file)
@@ -207,8 +207,6 @@ public class EditRepositoryDialog extends JDialog {
 \r
                ownersPalette = new JPalette<String>(true);\r
 \r
-               useDocs = new JCheckBox(Translation.get("gb.useDocsDescription"),\r
-                               anRepository.useDocs);\r
                useIncrementalPushTags = new JCheckBox(Translation.get("gb.useIncrementalPushTagsDescription"),\r
                                anRepository.useIncrementalPushTags);\r
                showRemoteBranches = new JCheckBox(\r
@@ -558,7 +556,6 @@ public class EditRepositoryDialog extends JDialog {
                                : headRefField.getSelectedItem().toString();\r
                repository.gcPeriod = (Integer) gcPeriod.getSelectedItem();\r
                repository.gcThreshold = gcThreshold.getText();\r
-               repository.useDocs = useDocs.isSelected();\r
                repository.useIncrementalPushTags = useIncrementalPushTags.isSelected();\r
                repository.showRemoteBranches = showRemoteBranches.isSelected();\r
                repository.skipSizeCalculation = skipSizeCalculation.isSelected();\r
index 5883ab04545750d4fed1133eaf0e41a85d91cefb..d68845892bf1402ea9b73419090f9da1c3fc609a 100644 (file)
@@ -98,11 +98,6 @@ public class IndicatorsRenderer extends JPanel implements TableCellRenderer, Ser
                                tooltip.append(Translation.get("gb.isFork")).append("<br/>");\r
                                add(icon);\r
                        }\r
-                       if (model.useDocs) {\r
-                               JLabel icon = new JLabel(doxIcon);\r
-                               tooltip.append(Translation.get("gb.docs")).append("<br/>");\r
-                               add(icon);\r
-                       }\r
                        if (model.isFrozen) {\r
                                JLabel icon = new JLabel(frozenIcon);\r
                                tooltip.append(Translation.get("gb.isFrozen")).append("<br/>");\r
index 40a5acd244743b1ab95d3d32d8ffb07f21fea006..b76e9bc692ee4155ae1dabcca2822034a2e7a946 100644 (file)
@@ -51,7 +51,6 @@ public class RepositoryModel implements Serializable, Comparable<RepositoryModel
        public String lastChangeAuthor;\r
        public boolean hasCommits;\r
        public boolean showRemoteBranches;\r
-       public boolean useDocs;\r
        public boolean useIncrementalPushTags;\r
        public String incrementalPushTagPrefix;\r
        public AccessRestrictionType accessRestriction;\r
@@ -210,7 +209,6 @@ public class RepositoryModel implements Serializable, Comparable<RepositoryModel
                clone.federationStrategy = federationStrategy;\r
                clone.showRemoteBranches = false;\r
                clone.allowForks = false;\r
-               clone.useDocs = useDocs;\r
                clone.skipSizeCalculation = skipSizeCalculation;\r
                clone.skipSummaryMetrics = skipSummaryMetrics;\r
                clone.sparkleshareId = sparkleshareId;\r
index d8939e7529cfbaa0edc32644817f37274bf88657..7765aeae18d4cc1961d3f12652ad0cbba7dbb1d1 100644 (file)
                                <tr><th><wicket:message key="gb.gcPeriod"></wicket:message></th><td class="edit"><select class="span2" wicket:id="gcPeriod" tabindex="5" /> &nbsp;<span class="help-inline"><wicket:message key="gb.gcPeriodDescription"></wicket:message></span></td></tr>\r
                                <tr><th><wicket:message key="gb.gcThreshold"></wicket:message></th><td class="edit"><input class="span1" type="text" wicket:id="gcThreshold" tabindex="6" /> &nbsp;<span class="help-inline"><wicket:message key="gb.gcThresholdDescription"></wicket:message></span></td></tr>\r
                                <tr><th colspan="2"><hr/></th></tr>\r
-                               <tr><th><wicket:message key="gb.enableDocs"></wicket:message></th><td class="edit"><label class="checkbox"><input type="checkbox" wicket:id="useDocs" tabindex="8" /> &nbsp;<span class="help-inline"><wicket:message key="gb.useDocsDescription"></wicket:message></span></label></td></tr>\r
-                               <tr><th><wicket:message key="gb.enableIncrementalPushTags"></wicket:message></th><td class="edit"><label class="checkbox"><input type="checkbox" wicket:id="useIncrementalPushTags" tabindex="8" /> &nbsp;<span class="help-inline"><wicket:message key="gb.useIncrementalPushTagsDescription"></wicket:message></span></label></td></tr>\r
-                               <tr><th><wicket:message key="gb.showRemoteBranches"></wicket:message></th><td class="edit"><label class="checkbox"><input type="checkbox" wicket:id="showRemoteBranches" tabindex="9" /> &nbsp;<span class="help-inline"><wicket:message key="gb.showRemoteBranchesDescription"></wicket:message></span></label></td></tr>\r
-                               <tr><th><wicket:message key="gb.skipSizeCalculation"></wicket:message></th><td class="edit"><label class="checkbox"><input type="checkbox" wicket:id="skipSizeCalculation" tabindex="10" /> &nbsp;<span class="help-inline"><wicket:message key="gb.skipSizeCalculationDescription"></wicket:message></span></label></td></tr>\r
-                               <tr><th><wicket:message key="gb.skipSummaryMetrics"></wicket:message></th><td class="edit"><label class="checkbox"><input type="checkbox" wicket:id="skipSummaryMetrics" tabindex="11" /> &nbsp;<span class="help-inline"><wicket:message key="gb.skipSummaryMetricsDescription"></wicket:message></span></label></td></tr>\r
-                               <tr><th><wicket:message key="gb.maxActivityCommits"></wicket:message></th><td class="edit"><select class="span2" wicket:id="maxActivityCommits" tabindex="12" /> &nbsp;<span class="help-inline"><wicket:message key="gb.maxActivityCommitsDescription"></wicket:message></span></td></tr>\r
-                               <tr><th><wicket:message key="gb.metricAuthorExclusions"></wicket:message></th><td class="edit"><input class="span8" type="text" wicket:id="metricAuthorExclusions" size="40" tabindex="13" /></td></tr>\r
-                               <tr><th><wicket:message key="gb.commitMessageRenderer"></wicket:message></th><td class="edit"><select class="span2" wicket:id="commitMessageRenderer" tabindex="14" /></td></tr>\r
+                               <tr><th><wicket:message key="gb.enableIncrementalPushTags"></wicket:message></th><td class="edit"><label class="checkbox"><input type="checkbox" wicket:id="useIncrementalPushTags" tabindex="7" /> &nbsp;<span class="help-inline"><wicket:message key="gb.useIncrementalPushTagsDescription"></wicket:message></span></label></td></tr>\r
+                               <tr><th><wicket:message key="gb.showRemoteBranches"></wicket:message></th><td class="edit"><label class="checkbox"><input type="checkbox" wicket:id="showRemoteBranches" tabindex="8" /> &nbsp;<span class="help-inline"><wicket:message key="gb.showRemoteBranchesDescription"></wicket:message></span></label></td></tr>\r
+                               <tr><th><wicket:message key="gb.skipSizeCalculation"></wicket:message></th><td class="edit"><label class="checkbox"><input type="checkbox" wicket:id="skipSizeCalculation" tabindex="9" /> &nbsp;<span class="help-inline"><wicket:message key="gb.skipSizeCalculationDescription"></wicket:message></span></label></td></tr>\r
+                               <tr><th><wicket:message key="gb.skipSummaryMetrics"></wicket:message></th><td class="edit"><label class="checkbox"><input type="checkbox" wicket:id="skipSummaryMetrics" tabindex="10" /> &nbsp;<span class="help-inline"><wicket:message key="gb.skipSummaryMetricsDescription"></wicket:message></span></label></td></tr>\r
+                               <tr><th><wicket:message key="gb.maxActivityCommits"></wicket:message></th><td class="edit"><select class="span2" wicket:id="maxActivityCommits" tabindex="11" /> &nbsp;<span class="help-inline"><wicket:message key="gb.maxActivityCommitsDescription"></wicket:message></span></td></tr>\r
+                               <tr><th><wicket:message key="gb.metricAuthorExclusions"></wicket:message></th><td class="edit"><input class="span8" type="text" wicket:id="metricAuthorExclusions" size="40" tabindex="12" /></td></tr>\r
+                               <tr><th><wicket:message key="gb.commitMessageRenderer"></wicket:message></th><td class="edit"><select class="span2" wicket:id="commitMessageRenderer" tabindex="13" /></td></tr>\r
                                <tr><th colspan="2"><hr/></th></tr>\r
-                               <tr><th><wicket:message key="gb.mailingLists"></wicket:message></th><td class="edit"><input class="span8" type="text" wicket:id="mailingLists" size="40" tabindex="15" /></td></tr>\r
+                               <tr><th><wicket:message key="gb.mailingLists"></wicket:message></th><td class="edit"><input class="span8" type="text" wicket:id="mailingLists" size="40" tabindex="14" /></td></tr>\r
                        </tbody>\r
                </table>\r
                </div>\r
                <div class="tab-pane" id="permissions">\r
                        <table class="plain">\r
                                <tbody class="settings">\r
-                                       <tr><th><wicket:message key="gb.owners"></wicket:message></th><td class="edit"><span wicket:id="owners" tabindex="16" /> </td></tr>\r
+                                       <tr><th><wicket:message key="gb.owners"></wicket:message></th><td class="edit"><span wicket:id="owners" tabindex="15" /> </td></tr>\r
                                        <tr><th colspan="2"><hr/></th></tr>\r
-                                       <tr><th><wicket:message key="gb.accessRestriction"></wicket:message></th><td class="edit"><select class="span4" wicket:id="accessRestriction" tabindex="17" /></td></tr>\r
+                                       <tr><th><wicket:message key="gb.accessRestriction"></wicket:message></th><td class="edit"><select class="span4" wicket:id="accessRestriction" tabindex="16" /></td></tr>\r
                                        <tr><th colspan="2"><hr/></th></tr>\r
                                        <tr><th><wicket:message key="gb.authorizationControl"></wicket:message></th><td style="padding:2px;"><span class="authorizationControl" wicket:id="authorizationControl"></span></td></tr>\r
                                        <tr><th colspan="2"><hr/></th></tr>\r
-                                       <tr><th><wicket:message key="gb.isFrozen"></wicket:message></th><td class="edit"><label class="checkbox"><input type="checkbox" wicket:id="isFrozen" tabindex="18" /> &nbsp;<span class="help-inline"><wicket:message key="gb.isFrozenDescription"></wicket:message></span></label></td></tr>\r
-                                       <tr><th><wicket:message key="gb.allowForks"></wicket:message></th><td class="edit"><label class="checkbox"><input type="checkbox" wicket:id="allowForks" tabindex="19" /> &nbsp;<span class="help-inline"><wicket:message key="gb.allowForksDescription"></wicket:message></span></label></td></tr>\r
-                                       <tr><th><wicket:message key="gb.verifyCommitter"></wicket:message></th><td class="edit"><label class="checkbox"><input type="checkbox" wicket:id="verifyCommitter" tabindex="20" /> &nbsp;<span class="help-inline"><wicket:message key="gb.verifyCommitterDescription"></wicket:message></span><br/><span class="help-inline" style="padding-left:10px;"><wicket:message key="gb.verifyCommitterNote"></wicket:message></span></label></td></tr>\r
+                                       <tr><th><wicket:message key="gb.isFrozen"></wicket:message></th><td class="edit"><label class="checkbox"><input type="checkbox" wicket:id="isFrozen" tabindex="17" /> &nbsp;<span class="help-inline"><wicket:message key="gb.isFrozenDescription"></wicket:message></span></label></td></tr>\r
+                                       <tr><th><wicket:message key="gb.allowForks"></wicket:message></th><td class="edit"><label class="checkbox"><input type="checkbox" wicket:id="allowForks" tabindex="18" /> &nbsp;<span class="help-inline"><wicket:message key="gb.allowForksDescription"></wicket:message></span></label></td></tr>\r
+                                       <tr><th><wicket:message key="gb.verifyCommitter"></wicket:message></th><td class="edit"><label class="checkbox"><input type="checkbox" wicket:id="verifyCommitter" tabindex="19" /> &nbsp;<span class="help-inline"><wicket:message key="gb.verifyCommitterDescription"></wicket:message></span><br/><span class="help-inline" style="padding-left:10px;"><wicket:message key="gb.verifyCommitterNote"></wicket:message></span></label></td></tr>\r
                                        <tr><th colspan="2"><hr/></th></tr>\r
                                        <tr><th><wicket:message key="gb.userPermissions"></wicket:message></th><td style="padding:2px;"><span wicket:id="users"></span></td></tr>\r
                                        <tr><th colspan="2"><hr/></th></tr>\r
@@ -72,7 +71,7 @@
                <div class="tab-pane" id="federation">\r
                        <table class="plain">\r
                                <tbody class="settings">\r
-                                       <tr><th><wicket:message key="gb.federationStrategy"></wicket:message></th><td class="edit"><select class="span4" wicket:id="federationStrategy" tabindex="21" /></td></tr>\r
+                                       <tr><th><wicket:message key="gb.federationStrategy"></wicket:message></th><td class="edit"><select class="span4" wicket:id="federationStrategy" tabindex="20" /></td></tr>\r
                                        <tr><th><wicket:message key="gb.federationSets"></wicket:message></th><td style="padding:2px;"><span wicket:id="federationSets"></span></td></tr>\r
                                </tbody>\r
                        </table>\r
index f0afb57c3b4d0e2491c1f50945f4edd18a0d713b..1b3cbd6cab8e92963efd3053337b15f1197a923f 100644 (file)
@@ -445,7 +445,6 @@ public class EditRepositoryPage extends RootSubPage {
                }\r
                form.add(new DropDownChoice<FederationStrategy>("federationStrategy", federationStrategies,\r
                                new FederationTypeRenderer()));\r
-               form.add(new CheckBox("useDocs"));\r
                form.add(new CheckBox("useIncrementalPushTags"));\r
                form.add(new CheckBox("showRemoteBranches"));\r
                form.add(new CheckBox("skipSizeCalculation"));\r
index 70a2b9eb5de4742cb7f147cbe87d230e8c54df75..93af1bef3af608f891e3abaf99f61272a3ac727d 100644 (file)
@@ -196,6 +196,7 @@ public abstract class RepositoryPage extends RootPage {
                }\r
                pages.put("commits", new PageRegistration("gb.commits", LogPage.class, params));\r
                pages.put("tree", new PageRegistration("gb.tree", TreePage.class, params));\r
+               pages.put("docs", new PageRegistration("gb.docs", DocsPage.class, params, true));\r
                pages.put("compare", new PageRegistration("gb.compare", ComparePage.class, params, true));\r
                if (GitBlit.getBoolean(Keys.web.allowForking, true)) {\r
                        pages.put("forks", new PageRegistration("gb.forks", ForksPage.class, params, true));\r
@@ -203,9 +204,6 @@ public abstract class RepositoryPage extends RootPage {
 \r
                // conditional links\r
                // per-repository extra page links\r
-               if (model.useDocs) {\r
-                       pages.put("docs", new PageRegistration("gb.docs", DocsPage.class, params, true));\r
-               }\r
                if (JGitUtils.getPagesBranch(r) != null) {\r
                        OtherPageLink pagesLink = new OtherPageLink("gb.pages", PagesServlet.asLink(\r
                                        getRequest().getRelativePathPrefixToContextRoot(), repositoryName, null), true);\r
index ab75408b132adf969b0c5c7e43cd5ab810c4771f..96787fdf22a545923eec29fa6f8748f4974ef362 100644 (file)
@@ -155,7 +155,6 @@ public class GitBlitSuite {
                        cloneOrFetch("test/ambition.git", "https://github.com/defunkt/ambition.git");\r
                        cloneOrFetch("test/gitective.git", "https://github.com/kevinsawicki/gitective.git");\r
 \r
-                       enableDocs("ticgit.git");\r
                        showRemoteBranches("ticgit.git");\r
                        automaticallyTagBranchTips("ticgit.git");\r
                        showRemoteBranches("test/jgit.git");\r
@@ -178,16 +177,6 @@ public class GitBlitSuite {
                System.out.println("done.");\r
        }\r
 \r
-       private static void enableDocs(String repositoryName) {\r
-               try {\r
-                       RepositoryModel model = GitBlit.self().getRepositoryModel(repositoryName);\r
-                       model.useDocs = true;\r
-                       GitBlit.self().updateRepositoryModel(model.name, model, false);\r
-               } catch (GitBlitException g) {\r
-                       g.printStackTrace();\r
-               }\r
-       }\r
-\r
        private static void showRemoteBranches(String repositoryName) {\r
                try {\r
                        RepositoryModel model = GitBlit.self().getRepositoryModel(repositoryName);\r