From 445b72e789b9414588dccd2d367e43f1e8821039 Mon Sep 17 00:00:00 2001 From: James Moger Date: Thu, 14 Nov 2013 18:10:42 -0500 Subject: [PATCH] Eliminate the "enumerate documentation" repository setting Change-Id: I3a7c13b4c626f8b5ea2a63717dfe4249c19eebb4 --- releases.moxie | 1 + src/main/java/com/gitblit/GitBlit.java | 2 -- .../gitblit/client/EditRepositoryDialog.java | 3 -- .../gitblit/client/IndicatorsRenderer.java | 5 ---- .../com/gitblit/models/RepositoryModel.java | 2 -- .../wicket/pages/EditRepositoryPage.html | 29 +++++++++---------- .../wicket/pages/EditRepositoryPage.java | 1 - .../gitblit/wicket/pages/RepositoryPage.java | 4 +-- .../java/com/gitblit/tests/GitBlitSuite.java | 11 ------- 9 files changed, 16 insertions(+), 42 deletions(-) diff --git a/releases.moxie b/releases.moxie index d66dba66..73a10a6f 100644 --- a/releases.moxie +++ b/releases.moxie @@ -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) diff --git a/src/main/java/com/gitblit/GitBlit.java b/src/main/java/com/gitblit/GitBlit.java index a0e8b0a3..f191d6a6 100644 --- a/src/main/java/com/gitblit/GitBlit.java +++ b/src/main/java/com/gitblit/GitBlit.java @@ -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"))) { diff --git a/src/main/java/com/gitblit/client/EditRepositoryDialog.java b/src/main/java/com/gitblit/client/EditRepositoryDialog.java index 1c499ee1..ab5a74a2 100644 --- a/src/main/java/com/gitblit/client/EditRepositoryDialog.java +++ b/src/main/java/com/gitblit/client/EditRepositoryDialog.java @@ -207,8 +207,6 @@ public class EditRepositoryDialog extends JDialog { ownersPalette = new JPalette(true); - useDocs = new JCheckBox(Translation.get("gb.useDocsDescription"), - anRepository.useDocs); useIncrementalPushTags = new JCheckBox(Translation.get("gb.useIncrementalPushTagsDescription"), anRepository.useIncrementalPushTags); showRemoteBranches = new JCheckBox( @@ -558,7 +556,6 @@ public class EditRepositoryDialog extends JDialog { : headRefField.getSelectedItem().toString(); repository.gcPeriod = (Integer) gcPeriod.getSelectedItem(); repository.gcThreshold = gcThreshold.getText(); - repository.useDocs = useDocs.isSelected(); repository.useIncrementalPushTags = useIncrementalPushTags.isSelected(); repository.showRemoteBranches = showRemoteBranches.isSelected(); repository.skipSizeCalculation = skipSizeCalculation.isSelected(); diff --git a/src/main/java/com/gitblit/client/IndicatorsRenderer.java b/src/main/java/com/gitblit/client/IndicatorsRenderer.java index 5883ab04..d6884589 100644 --- a/src/main/java/com/gitblit/client/IndicatorsRenderer.java +++ b/src/main/java/com/gitblit/client/IndicatorsRenderer.java @@ -98,11 +98,6 @@ public class IndicatorsRenderer extends JPanel implements TableCellRenderer, Ser tooltip.append(Translation.get("gb.isFork")).append("
"); add(icon); } - if (model.useDocs) { - JLabel icon = new JLabel(doxIcon); - tooltip.append(Translation.get("gb.docs")).append("
"); - add(icon); - } if (model.isFrozen) { JLabel icon = new JLabel(frozenIcon); tooltip.append(Translation.get("gb.isFrozen")).append("
"); diff --git a/src/main/java/com/gitblit/models/RepositoryModel.java b/src/main/java/com/gitblit/models/RepositoryModel.java index 40a5acd2..b76e9bc6 100644 --- a/src/main/java/com/gitblit/models/RepositoryModel.java +++ b/src/main/java/com/gitblit/models/RepositoryModel.java @@ -51,7 +51,6 @@ public class RepositoryModel implements Serializable, Comparable  
- - - - - - -   + + + + + + @@ -51,15 +50,15 @@
- + - + - - - + + + @@ -72,7 +71,7 @@





- +
diff --git a/src/main/java/com/gitblit/wicket/pages/EditRepositoryPage.java b/src/main/java/com/gitblit/wicket/pages/EditRepositoryPage.java index f0afb57c..1b3cbd6c 100644 --- a/src/main/java/com/gitblit/wicket/pages/EditRepositoryPage.java +++ b/src/main/java/com/gitblit/wicket/pages/EditRepositoryPage.java @@ -445,7 +445,6 @@ public class EditRepositoryPage extends RootSubPage { } form.add(new DropDownChoice("federationStrategy", federationStrategies, new FederationTypeRenderer())); - form.add(new CheckBox("useDocs")); form.add(new CheckBox("useIncrementalPushTags")); form.add(new CheckBox("showRemoteBranches")); form.add(new CheckBox("skipSizeCalculation")); diff --git a/src/main/java/com/gitblit/wicket/pages/RepositoryPage.java b/src/main/java/com/gitblit/wicket/pages/RepositoryPage.java index 70a2b9eb..93af1bef 100644 --- a/src/main/java/com/gitblit/wicket/pages/RepositoryPage.java +++ b/src/main/java/com/gitblit/wicket/pages/RepositoryPage.java @@ -196,6 +196,7 @@ public abstract class RepositoryPage extends RootPage { } pages.put("commits", new PageRegistration("gb.commits", LogPage.class, params)); pages.put("tree", new PageRegistration("gb.tree", TreePage.class, params)); + pages.put("docs", new PageRegistration("gb.docs", DocsPage.class, params, true)); pages.put("compare", new PageRegistration("gb.compare", ComparePage.class, params, true)); if (GitBlit.getBoolean(Keys.web.allowForking, true)) { pages.put("forks", new PageRegistration("gb.forks", ForksPage.class, params, true)); @@ -203,9 +204,6 @@ public abstract class RepositoryPage extends RootPage { // conditional links // per-repository extra page links - if (model.useDocs) { - pages.put("docs", new PageRegistration("gb.docs", DocsPage.class, params, true)); - } if (JGitUtils.getPagesBranch(r) != null) { OtherPageLink pagesLink = new OtherPageLink("gb.pages", PagesServlet.asLink( getRequest().getRelativePathPrefixToContextRoot(), repositoryName, null), true); diff --git a/src/test/java/com/gitblit/tests/GitBlitSuite.java b/src/test/java/com/gitblit/tests/GitBlitSuite.java index ab75408b..96787fdf 100644 --- a/src/test/java/com/gitblit/tests/GitBlitSuite.java +++ b/src/test/java/com/gitblit/tests/GitBlitSuite.java @@ -155,7 +155,6 @@ public class GitBlitSuite { cloneOrFetch("test/ambition.git", "https://github.com/defunkt/ambition.git"); cloneOrFetch("test/gitective.git", "https://github.com/kevinsawicki/gitective.git"); - enableDocs("ticgit.git"); showRemoteBranches("ticgit.git"); automaticallyTagBranchTips("ticgit.git"); showRemoteBranches("test/jgit.git"); @@ -178,16 +177,6 @@ public class GitBlitSuite { System.out.println("done."); } - private static void enableDocs(String repositoryName) { - try { - RepositoryModel model = GitBlit.self().getRepositoryModel(repositoryName); - model.useDocs = true; - GitBlit.self().updateRepositoryModel(model.name, model, false); - } catch (GitBlitException g) { - g.printStackTrace(); - } - } - private static void showRemoteBranches(String repositoryName) { try { RepositoryModel model = GitBlit.self().getRepositoryModel(repositoryName); -- 2.39.5