]> source.dussan.org Git - gitblit.git/commitdiff
added attribute useIncrementalRevisionNumbers to repository model
authorsaheba <mail@saheba.net>
Mon, 25 Mar 2013 20:32:06 +0000 (21:32 +0100)
committersaheba <mail@saheba.net>
Mon, 25 Mar 2013 20:32:06 +0000 (21:32 +0100)
src/com/gitblit/GitBlit.java
src/com/gitblit/client/EditRepositoryDialog.java
src/com/gitblit/models/RepositoryModel.java
src/com/gitblit/wicket/GitBlitWebApp.properties
src/com/gitblit/wicket/pages/EditRepositoryPage.html
src/com/gitblit/wicket/pages/EditRepositoryPage.java

index 4cfd61e46638a5a31defa960d983ed2bc342b095..3ac8d1707bd390c6b8412942f37bfb1ddd149f3d 100644 (file)
@@ -1668,6 +1668,7 @@ public class GitBlit implements ServletContextListener {
                        model.addOwners(ArrayUtils.fromString(getConfig(config, "owner", "")));\r
                        model.useTickets = getConfig(config, "useTickets", false);\r
                        model.useDocs = getConfig(config, "useDocs", false);\r
+                       model.useIncrementalRevisionNumbers = getConfig(config, "useIncrementalRevisionNumbers", false);\r
                        model.allowForks = getConfig(config, "allowForks", true);\r
                        model.accessRestriction = AccessRestrictionType.fromName(getConfig(config,\r
                                        "accessRestriction", settings.getString(Keys.git.defaultAccessRestriction, null)));\r
@@ -2186,6 +2187,7 @@ public class GitBlit implements ServletContextListener {
                config.setString(Constants.CONFIG_GITBLIT, null, "owner", ArrayUtils.toString(repository.owners));\r
                config.setBoolean(Constants.CONFIG_GITBLIT, null, "useTickets", repository.useTickets);\r
                config.setBoolean(Constants.CONFIG_GITBLIT, null, "useDocs", repository.useDocs);\r
+               config.setBoolean(Constants.CONFIG_GITBLIT, null, "useIncrementalRevisionNumbers", repository.useIncrementalRevisionNumbers);\r
                config.setBoolean(Constants.CONFIG_GITBLIT, null, "allowForks", repository.allowForks);\r
                config.setString(Constants.CONFIG_GITBLIT, null, "accessRestriction", repository.accessRestriction.name());\r
                config.setString(Constants.CONFIG_GITBLIT, null, "authorizationControl", repository.authorizationControl.name());\r
index 8851de430cc5d92245f1d8885c79038d6feadf9c..25f42f4a2e01ae69193220fc2529e9fb8b921c4b 100644 (file)
@@ -92,6 +92,8 @@ public class EditRepositoryDialog extends JDialog {
 \r
        private JCheckBox useDocs;\r
 \r
+       private JCheckBox useIncrementalRevisionNumbers;\r
+       \r
        private JCheckBox showRemoteBranches;\r
 \r
        private JCheckBox showReadme;\r
@@ -212,6 +214,8 @@ public class EditRepositoryDialog extends JDialog {
                                anRepository.useTickets);\r
                useDocs = new JCheckBox(Translation.get("gb.useDocsDescription"),\r
                                anRepository.useDocs);\r
+               useIncrementalRevisionNumbers = new JCheckBox(Translation.get("gb.useIncrementalRevisionNumbersDescription"),\r
+                               anRepository.useIncrementalRevisionNumbers);\r
                showRemoteBranches = new JCheckBox(\r
                                Translation.get("gb.showRemoteBranchesDescription"),\r
                                anRepository.showRemoteBranches);\r
@@ -309,6 +313,8 @@ public class EditRepositoryDialog extends JDialog {
                                useTickets));\r
                fieldsPanel\r
                                .add(newFieldPanel(Translation.get("gb.enableDocs"), useDocs));\r
+               fieldsPanel\r
+               .add(newFieldPanel(Translation.get("gb.enableIncrementalRevisionNumbers"), useIncrementalRevisionNumbers));\r
                fieldsPanel.add(newFieldPanel(Translation.get("gb.showRemoteBranches"),\r
                                showRemoteBranches));\r
                fieldsPanel.add(newFieldPanel(Translation.get("gb.showReadme"),\r
@@ -563,6 +569,7 @@ public class EditRepositoryDialog extends JDialog {
                repository.gcThreshold = gcThreshold.getText();\r
                repository.useTickets = useTickets.isSelected();\r
                repository.useDocs = useDocs.isSelected();\r
+               repository.useIncrementalRevisionNumbers = useIncrementalRevisionNumbers.isSelected();\r
                repository.showRemoteBranches = showRemoteBranches.isSelected();\r
                repository.showReadme = showReadme.isSelected();\r
                repository.skipSizeCalculation = skipSizeCalculation.isSelected();\r
index a2dab3c5106203866cde4f95ed15d145461f4c7d..1f2ee2df64110fceb19d4615397cd07581a4e00e 100644 (file)
@@ -50,6 +50,7 @@ public class RepositoryModel implements Serializable, Comparable<RepositoryModel
        public boolean showRemoteBranches;\r
        public boolean useTickets;\r
        public boolean useDocs;\r
+       public boolean useIncrementalRevisionNumbers;\r
        public AccessRestrictionType accessRestriction;\r
        public AuthorizationControl authorizationControl;\r
        public boolean allowAuthenticated;\r
@@ -201,6 +202,7 @@ public class RepositoryModel implements Serializable, Comparable<RepositoryModel
                clone.showRemoteBranches = false;\r
                clone.allowForks = false;\r
                clone.useDocs = useDocs;\r
+               clone.useIncrementalRevisionNumbers = useIncrementalRevisionNumbers;\r
                clone.useTickets = useTickets;\r
                clone.skipSizeCalculation = skipSizeCalculation;\r
                clone.skipSummaryMetrics = skipSummaryMetrics;\r
index a993f9f15816e8e496d7fb1128d311ebb51834f8..b6b59ac5efda67c8a477ba17e2e1eff215770e3d 100644 (file)
@@ -73,6 +73,7 @@ gb.accessRestriction = access restriction
 gb.name = name\r
 gb.enableTickets = enable tickets\r
 gb.enableDocs = enable docs\r
+gb.enableIncrementalRevisionNumbers = enable incremental revision numbers\r
 gb.save = save\r
 gb.showRemoteBranches = show remote branches\r
 gb.editUsers = edit users\r
@@ -85,6 +86,7 @@ gb.cloneRestricted = authenticated clone & push
 gb.viewRestricted = authenticated view, clone, & push\r
 gb.useTicketsDescription = readonly, distributed Ticgit issues\r
 gb.useDocsDescription = enumerates Markdown documentation in repository\r
+gb.useIncrementalRevisionNumbersDescription = automatic tagging of each push with an incremental revision number\r
 gb.showRemoteBranchesDescription = show remote branches\r
 gb.canAdminDescription = can administer Gitblit server\r
 gb.permittedUsers = permitted users\r
index 7fc0de230fe36f162a7c2ff4cefbbfb1558ca09e..37ea0dd25c04f10864c4bc7e45da9bced5bee433 100644 (file)
@@ -35,6 +35,7 @@
                                <tr><th colspan="2"><hr/></th></tr>\r
                                <tr><th><wicket:message key="gb.enableTickets"></wicket:message></th><td class="edit"><label class="checkbox"><input type="checkbox" wicket:id="useTickets" tabindex="7" /> &nbsp;<span class="help-inline"><wicket:message key="gb.useTicketsDescription"></wicket:message></span></label></td></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.enableIncrementalRevisionNumbers"></wicket:message></th><td class="edit"><label class="checkbox"><input type="checkbox" wicket:id="useIncrementalRevisionNumbers" tabindex="8" /> &nbsp;<span class="help-inline"><wicket:message key="gb.useIncrementalRevisionNumbersDescription"></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.showReadme"></wicket:message></th><td class="edit"><label class="checkbox"><input type="checkbox" wicket:id="showReadme" tabindex="10" /> &nbsp;<span class="help-inline"><wicket:message key="gb.showReadmeDescription"></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="11" /> &nbsp;<span class="help-inline"><wicket:message key="gb.skipSizeCalculationDescription"></wicket:message></span></label></td></tr>\r
index d68d6550ad4b67042819d8ed0469e01d01e7e753..2cbb88cc4b0c2d4551b685c75d687c3a9a55d2d3 100644 (file)
@@ -422,6 +422,7 @@ public class EditRepositoryPage extends RootSubPage {
                                new FederationTypeRenderer()));\r
                form.add(new CheckBox("useTickets"));\r
                form.add(new CheckBox("useDocs"));\r
+               form.add(new CheckBox("useIncrementalRevisionNumbers"));\r
                form.add(new CheckBox("showRemoteBranches"));\r
                form.add(new CheckBox("showReadme"));\r
                form.add(new CheckBox("skipSizeCalculation"));\r