]> source.dussan.org Git - gitblit.git/commitdiff
Add merge type setting to repository page. 1142/head merged--merge-strategy
authorFlorian Zschocke <florian.zschocke@cycos.com>
Mon, 23 Jun 2014 02:12:19 +0000 (04:12 +0200)
committerFlorian Zschocke <florian.zschocke@devolo.de>
Fri, 28 Oct 2016 09:02:25 +0000 (11:02 +0200)
The merge type is a per repository setting. Add it to the edit page.

src/main/java/com/gitblit/wicket/GitBlitWebApp.properties
src/main/java/com/gitblit/wicket/pages/EditRepositoryPage.html
src/main/java/com/gitblit/wicket/pages/EditRepositoryPage.java

index a215b4d6dbec180d032d1b425680d5c86afc7e0b..b3cbef82fe2ee889a7ca91766514c5e937e7ac39 100644 (file)
@@ -660,6 +660,7 @@ gb.nTotalTickets = {0} total
 gb.body = body
 gb.mergeSha = mergeSha
 gb.mergeTo = merge to
+gb.mergeType = merge type
 gb.labels = labels
 gb.reviewers = reviewers
 gb.voters = voters
@@ -671,6 +672,7 @@ gb.repositoryDoesNotAcceptPatchsets = This repository does not accept patchsets.
 gb.serverDoesNotAcceptPatchsets = This server does not accept patchsets.
 gb.ticketIsClosed = This ticket is closed.
 gb.mergeToDescription = default integration branch for merging ticket patchsets
+gb.mergeTypeDescription = merge a ticket fast-forward only, if necessary, or always with a merge commit to the integration branch
 gb.anonymousCanNotPropose = Anonymous users can not propose patchsets.
 gb.youDoNotHaveClonePermission = You are not permitted to clone this repository.
 gb.myTickets = my tickets
index 7a55b9f58cd253e990170256dc47d67edb1f6778..2c881efcc2b9947abd91cf346b07011ae1349608 100644 (file)
                        <div wicket:id="acceptNewTickets"></div>\r
                        <div wicket:id="requireApproval"></div>\r
                        <div wicket:id="mergeTo"></div>\r
-               \r
+                       <div wicket:id="mergeType"></div>\r
+\r
                </div>\r
                                \r
                <!-- federation -->\r
index 6bcf6f514c4514ac759168980310dcfed6b24434..bf3eea8bad4fcac3d8f9cdfc23799030a0a25244 100644 (file)
@@ -56,6 +56,7 @@ import com.gitblit.Constants.AccessRestrictionType;
 import com.gitblit.Constants.AuthorizationControl;\r
 import com.gitblit.Constants.CommitMessageRenderer;\r
 import com.gitblit.Constants.FederationStrategy;\r
+import com.gitblit.Constants.MergeType;\r
 import com.gitblit.Constants.RegistrantType;\r
 import com.gitblit.GitBlitException;\r
 import com.gitblit.Keys;\r
@@ -458,6 +459,11 @@ public class EditRepositoryPage extends RootSubPage {
                                getString("gb.mergeToDescription"),\r
                                new PropertyModel<String>(repositoryModel, "mergeTo"),\r
                                availableBranches));\r
+               form.add(new ChoiceOption<MergeType>("mergeType",\r
+                               getString("gb.mergeType"),\r
+                               getString("gb.mergeTypeDescription"),\r
+                               new PropertyModel<MergeType>(repositoryModel, "mergeType"),\r
+                               Arrays.asList(MergeType.values())));\r
 \r
                //\r
                // RECEIVE\r