]> source.dussan.org Git - gitblit.git/commitdiff
Add merge type setting to repository page. ticket/104 218/head 04/104/1
authorFlorian Zschocke <florian.zschocke@cycos.com>
Mon, 23 Jun 2014 02:12:19 +0000 (04:12 +0200)
committerFlorian Zschocke <florian.zschocke@cycos.com>
Sun, 7 Sep 2014 20:40:18 +0000 (22:40 +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 eb92e2d29e197ab8061e3756cb54e235f465062f..eefebccad1f886e24deaaa8a98e14502c6a79fce 100644 (file)
@@ -659,6 +659,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
@@ -670,6 +671,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
@@ -741,4 +743,4 @@ gb.sshKeyCommentDescription = Enter an optional comment. If blank, the comment w
 gb.permission = Permission
 gb.sshKeyPermissionDescription = Specify the access permission for the SSH key
 gb.transportPreference = Transport Preference
-gb.transportPreferenceDescription = Set the transport that you prefer to use for cloning
\ No newline at end of file
+gb.transportPreferenceDescription = Set the transport that you prefer to use for cloning
index 1e683b4fbc8b985d9a55acebcd5ad3ac5e87b6a3..e7fa601feae770fb060c025ff0a694bb233ea5f9 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 b5c46ac296331ef54febcb3d5edfc1c9106b3a0e..a13c481af232192ca360e54a5560949270c06a25 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