Browse Source

Eliminate the "enumerate documentation" repository setting

Change-Id: I3a7c13b4c626f8b5ea2a63717dfe4249c19eebb4
tags/v1.4.0
James Moger 10 years ago
parent
commit
445b72e789

+ 1
- 0
releases.moxie View File

- Determine best commit id (e.g. "master") for the tree and docs pages and use that in links - 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. - 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 docs indicator on the repositories page
- Removed the repository setting to enable Markdown document enumeration, this is now automatic and expanded
additions: 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 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) - Added branch graph image servlet based on EGit's branch graph renderer (issue-194)

+ 0
- 2
src/main/java/com/gitblit/GitBlit.java View File

model.description = getConfig(config, "description", ""); model.description = getConfig(config, "description", "");
model.originRepository = getConfig(config, "originRepository", null); model.originRepository = getConfig(config, "originRepository", null);
model.addOwners(ArrayUtils.fromString(getConfig(config, "owner", ""))); model.addOwners(ArrayUtils.fromString(getConfig(config, "owner", "")));
model.useDocs = getConfig(config, "useDocs", false);
model.useIncrementalPushTags = getConfig(config, "useIncrementalPushTags", false); model.useIncrementalPushTags = getConfig(config, "useIncrementalPushTags", false);
model.incrementalPushTagPrefix = getConfig(config, "incrementalPushTagPrefix", null); model.incrementalPushTagPrefix = getConfig(config, "incrementalPushTagPrefix", null);
model.allowForks = getConfig(config, "allowForks", true); model.allowForks = getConfig(config, "allowForks", true);
config.setString(Constants.CONFIG_GITBLIT, null, "description", repository.description); config.setString(Constants.CONFIG_GITBLIT, null, "description", repository.description);
config.setString(Constants.CONFIG_GITBLIT, null, "originRepository", repository.originRepository); config.setString(Constants.CONFIG_GITBLIT, null, "originRepository", repository.originRepository);
config.setString(Constants.CONFIG_GITBLIT, null, "owner", ArrayUtils.toString(repository.owners)); 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); config.setBoolean(Constants.CONFIG_GITBLIT, null, "useIncrementalPushTags", repository.useIncrementalPushTags);
if (StringUtils.isEmpty(repository.incrementalPushTagPrefix) || if (StringUtils.isEmpty(repository.incrementalPushTagPrefix) ||
repository.incrementalPushTagPrefix.equals(settings.getString(Keys.git.defaultIncrementalPushTagPrefix, "r"))) { repository.incrementalPushTagPrefix.equals(settings.getString(Keys.git.defaultIncrementalPushTagPrefix, "r"))) {

+ 0
- 3
src/main/java/com/gitblit/client/EditRepositoryDialog.java View File

ownersPalette = new JPalette<String>(true); ownersPalette = new JPalette<String>(true);
useDocs = new JCheckBox(Translation.get("gb.useDocsDescription"),
anRepository.useDocs);
useIncrementalPushTags = new JCheckBox(Translation.get("gb.useIncrementalPushTagsDescription"), useIncrementalPushTags = new JCheckBox(Translation.get("gb.useIncrementalPushTagsDescription"),
anRepository.useIncrementalPushTags); anRepository.useIncrementalPushTags);
showRemoteBranches = new JCheckBox( showRemoteBranches = new JCheckBox(
: headRefField.getSelectedItem().toString(); : headRefField.getSelectedItem().toString();
repository.gcPeriod = (Integer) gcPeriod.getSelectedItem(); repository.gcPeriod = (Integer) gcPeriod.getSelectedItem();
repository.gcThreshold = gcThreshold.getText(); repository.gcThreshold = gcThreshold.getText();
repository.useDocs = useDocs.isSelected();
repository.useIncrementalPushTags = useIncrementalPushTags.isSelected(); repository.useIncrementalPushTags = useIncrementalPushTags.isSelected();
repository.showRemoteBranches = showRemoteBranches.isSelected(); repository.showRemoteBranches = showRemoteBranches.isSelected();
repository.skipSizeCalculation = skipSizeCalculation.isSelected(); repository.skipSizeCalculation = skipSizeCalculation.isSelected();

+ 0
- 5
src/main/java/com/gitblit/client/IndicatorsRenderer.java View File

tooltip.append(Translation.get("gb.isFork")).append("<br/>"); tooltip.append(Translation.get("gb.isFork")).append("<br/>");
add(icon); add(icon);
} }
if (model.useDocs) {
JLabel icon = new JLabel(doxIcon);
tooltip.append(Translation.get("gb.docs")).append("<br/>");
add(icon);
}
if (model.isFrozen) { if (model.isFrozen) {
JLabel icon = new JLabel(frozenIcon); JLabel icon = new JLabel(frozenIcon);
tooltip.append(Translation.get("gb.isFrozen")).append("<br/>"); tooltip.append(Translation.get("gb.isFrozen")).append("<br/>");

+ 0
- 2
src/main/java/com/gitblit/models/RepositoryModel.java View File

public String lastChangeAuthor; public String lastChangeAuthor;
public boolean hasCommits; public boolean hasCommits;
public boolean showRemoteBranches; public boolean showRemoteBranches;
public boolean useDocs;
public boolean useIncrementalPushTags; public boolean useIncrementalPushTags;
public String incrementalPushTagPrefix; public String incrementalPushTagPrefix;
public AccessRestrictionType accessRestriction; public AccessRestrictionType accessRestriction;
clone.federationStrategy = federationStrategy; clone.federationStrategy = federationStrategy;
clone.showRemoteBranches = false; clone.showRemoteBranches = false;
clone.allowForks = false; clone.allowForks = false;
clone.useDocs = useDocs;
clone.skipSizeCalculation = skipSizeCalculation; clone.skipSizeCalculation = skipSizeCalculation;
clone.skipSummaryMetrics = skipSummaryMetrics; clone.skipSummaryMetrics = skipSummaryMetrics;
clone.sparkleshareId = sparkleshareId; clone.sparkleshareId = sparkleshareId;

+ 14
- 15
src/main/java/com/gitblit/wicket/pages/EditRepositoryPage.html View 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> <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>
<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> <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>
<tr><th colspan="2"><hr/></th></tr> <tr><th colspan="2"><hr/></th></tr>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<tr><th><wicket:message key="gb.commitMessageRenderer"></wicket:message></th><td class="edit"><select class="span2" wicket:id="commitMessageRenderer" tabindex="14" /></td></tr>
<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>
<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>
<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>
<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>
<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>
<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>
<tr><th><wicket:message key="gb.commitMessageRenderer"></wicket:message></th><td class="edit"><select class="span2" wicket:id="commitMessageRenderer" tabindex="13" /></td></tr>
<tr><th colspan="2"><hr/></th></tr> <tr><th colspan="2"><hr/></th></tr>
<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>
<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>
</tbody> </tbody>
</table> </table>
</div> </div>
<div class="tab-pane" id="permissions"> <div class="tab-pane" id="permissions">
<table class="plain"> <table class="plain">
<tbody class="settings"> <tbody class="settings">
<tr><th><wicket:message key="gb.owners"></wicket:message></th><td class="edit"><span wicket:id="owners" tabindex="16" /> </td></tr>
<tr><th><wicket:message key="gb.owners"></wicket:message></th><td class="edit"><span wicket:id="owners" tabindex="15" /> </td></tr>
<tr><th colspan="2"><hr/></th></tr> <tr><th colspan="2"><hr/></th></tr>
<tr><th><wicket:message key="gb.accessRestriction"></wicket:message></th><td class="edit"><select class="span4" wicket:id="accessRestriction" tabindex="17" /></td></tr>
<tr><th><wicket:message key="gb.accessRestriction"></wicket:message></th><td class="edit"><select class="span4" wicket:id="accessRestriction" tabindex="16" /></td></tr>
<tr><th colspan="2"><hr/></th></tr> <tr><th colspan="2"><hr/></th></tr>
<tr><th><wicket:message key="gb.authorizationControl"></wicket:message></th><td style="padding:2px;"><span class="authorizationControl" wicket:id="authorizationControl"></span></td></tr> <tr><th><wicket:message key="gb.authorizationControl"></wicket:message></th><td style="padding:2px;"><span class="authorizationControl" wicket:id="authorizationControl"></span></td></tr>
<tr><th colspan="2"><hr/></th></tr> <tr><th colspan="2"><hr/></th></tr>
<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>
<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>
<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>
<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>
<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>
<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>
<tr><th colspan="2"><hr/></th></tr> <tr><th colspan="2"><hr/></th></tr>
<tr><th><wicket:message key="gb.userPermissions"></wicket:message></th><td style="padding:2px;"><span wicket:id="users"></span></td></tr> <tr><th><wicket:message key="gb.userPermissions"></wicket:message></th><td style="padding:2px;"><span wicket:id="users"></span></td></tr>
<tr><th colspan="2"><hr/></th></tr> <tr><th colspan="2"><hr/></th></tr>
<div class="tab-pane" id="federation"> <div class="tab-pane" id="federation">
<table class="plain"> <table class="plain">
<tbody class="settings"> <tbody class="settings">
<tr><th><wicket:message key="gb.federationStrategy"></wicket:message></th><td class="edit"><select class="span4" wicket:id="federationStrategy" tabindex="21" /></td></tr>
<tr><th><wicket:message key="gb.federationStrategy"></wicket:message></th><td class="edit"><select class="span4" wicket:id="federationStrategy" tabindex="20" /></td></tr>
<tr><th><wicket:message key="gb.federationSets"></wicket:message></th><td style="padding:2px;"><span wicket:id="federationSets"></span></td></tr> <tr><th><wicket:message key="gb.federationSets"></wicket:message></th><td style="padding:2px;"><span wicket:id="federationSets"></span></td></tr>
</tbody> </tbody>
</table> </table>

+ 0
- 1
src/main/java/com/gitblit/wicket/pages/EditRepositoryPage.java View File

} }
form.add(new DropDownChoice<FederationStrategy>("federationStrategy", federationStrategies, form.add(new DropDownChoice<FederationStrategy>("federationStrategy", federationStrategies,
new FederationTypeRenderer())); new FederationTypeRenderer()));
form.add(new CheckBox("useDocs"));
form.add(new CheckBox("useIncrementalPushTags")); form.add(new CheckBox("useIncrementalPushTags"));
form.add(new CheckBox("showRemoteBranches")); form.add(new CheckBox("showRemoteBranches"));
form.add(new CheckBox("skipSizeCalculation")); form.add(new CheckBox("skipSizeCalculation"));

+ 1
- 3
src/main/java/com/gitblit/wicket/pages/RepositoryPage.java View File

} }
pages.put("commits", new PageRegistration("gb.commits", LogPage.class, params)); pages.put("commits", new PageRegistration("gb.commits", LogPage.class, params));
pages.put("tree", new PageRegistration("gb.tree", TreePage.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)); pages.put("compare", new PageRegistration("gb.compare", ComparePage.class, params, true));
if (GitBlit.getBoolean(Keys.web.allowForking, true)) { if (GitBlit.getBoolean(Keys.web.allowForking, true)) {
pages.put("forks", new PageRegistration("gb.forks", ForksPage.class, params, true)); pages.put("forks", new PageRegistration("gb.forks", ForksPage.class, params, true));
// conditional links // conditional links
// per-repository extra page 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) { if (JGitUtils.getPagesBranch(r) != null) {
OtherPageLink pagesLink = new OtherPageLink("gb.pages", PagesServlet.asLink( OtherPageLink pagesLink = new OtherPageLink("gb.pages", PagesServlet.asLink(
getRequest().getRelativePathPrefixToContextRoot(), repositoryName, null), true); getRequest().getRelativePathPrefixToContextRoot(), repositoryName, null), true);

+ 0
- 11
src/test/java/com/gitblit/tests/GitBlitSuite.java View File

cloneOrFetch("test/ambition.git", "https://github.com/defunkt/ambition.git"); cloneOrFetch("test/ambition.git", "https://github.com/defunkt/ambition.git");
cloneOrFetch("test/gitective.git", "https://github.com/kevinsawicki/gitective.git"); cloneOrFetch("test/gitective.git", "https://github.com/kevinsawicki/gitective.git");
enableDocs("ticgit.git");
showRemoteBranches("ticgit.git"); showRemoteBranches("ticgit.git");
automaticallyTagBranchTips("ticgit.git"); automaticallyTagBranchTips("ticgit.git");
showRemoteBranches("test/jgit.git"); showRemoteBranches("test/jgit.git");
System.out.println("done."); 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) { private static void showRemoteBranches(String repositoryName) {
try { try {
RepositoryModel model = GitBlit.self().getRepositoryModel(repositoryName); RepositoryModel model = GitBlit.self().getRepositoryModel(repositoryName);

Loading…
Cancel
Save