Merge branch 'stable-2.5'
* stable-2.5: Describe submit filter in the prolog-cookbook. Write a Cookbook for Prolog submit rules Fix message if pushing tag is rejected because tagger is somebody else Make commands to download patch sets configurable Show dependency list when change is needed by a draft change Create a draft patch set when a draft patch set is rebased Allow users of ChangeTable to control styling of change rows Fix displaying of file diff if draft patch has been deleted set-account command: Do not close ReviewDb that was injected Update HTTP password from SSH commands.
This commit is contained in:
		| @@ -353,6 +353,7 @@ public class ChangeUtil { | ||||
|         newPatchSet.setCreatedOn(new Timestamp(System.currentTimeMillis())); | ||||
|         newPatchSet.setUploader(user.getAccountId()); | ||||
|         newPatchSet.setRevision(new RevId(rebasedCommit.name())); | ||||
|         newPatchSet.setDraft(originalPatchSet.isDraft()); | ||||
|  | ||||
|         final PatchSetInfo info = | ||||
|             patchSetInfoFactory.get(rebasedCommit, newPatchSet.getId()); | ||||
|   | ||||
| @@ -14,8 +14,9 @@ | ||||
| 
 | ||||
| package com.google.gerrit.server.config; | ||||
| 
 | ||||
| import com.google.gerrit.reviewdb.client.SystemConfig; | ||||
| import com.google.gerrit.reviewdb.client.AccountGeneralPreferences.DownloadCommand; | ||||
| import com.google.gerrit.reviewdb.client.AccountGeneralPreferences.DownloadScheme; | ||||
| import com.google.gerrit.reviewdb.client.SystemConfig; | ||||
| import com.google.inject.Inject; | ||||
| import com.google.inject.Singleton; | ||||
| 
 | ||||
| @@ -28,22 +29,33 @@ import java.util.Set; | ||||
| 
 | ||||
| /** Download protocol from {@code gerrit.config}. */ | ||||
| @Singleton | ||||
| public class DownloadSchemeConfig { | ||||
| public class DownloadConfig { | ||||
|   private final Set<DownloadScheme> downloadSchemes; | ||||
|   private final Set<DownloadCommand> downloadCommands; | ||||
| 
 | ||||
|   @Inject | ||||
|   DownloadSchemeConfig(@GerritServerConfig final Config cfg, | ||||
|   DownloadConfig(@GerritServerConfig final Config cfg, | ||||
|       final SystemConfig s) { | ||||
|     List<DownloadScheme> all = | ||||
|     List<DownloadScheme> allSchemes = | ||||
|         ConfigUtil.getEnumList(cfg, "download", null, "scheme", | ||||
|             DownloadScheme.DEFAULT_DOWNLOADS); | ||||
| 
 | ||||
|     downloadSchemes = | ||||
|         Collections.unmodifiableSet(new HashSet<DownloadScheme>(all)); | ||||
|         Collections.unmodifiableSet(new HashSet<DownloadScheme>(allSchemes)); | ||||
| 
 | ||||
|     List<DownloadCommand> allCommands = | ||||
|         ConfigUtil.getEnumList(cfg, "download", null, "command", | ||||
|             DownloadCommand.DEFAULT_DOWNLOADS); | ||||
|     downloadCommands = | ||||
|         Collections.unmodifiableSet(new HashSet<DownloadCommand>(allCommands)); | ||||
|   } | ||||
| 
 | ||||
|   /** Scheme used to download. */ | ||||
|   public Set<DownloadScheme> getDownloadScheme() { | ||||
|   public Set<DownloadScheme> getDownloadSchemes() { | ||||
|     return downloadSchemes; | ||||
|   } | ||||
| 
 | ||||
|   /** Command used to download. */ | ||||
|   public Set<DownloadCommand> getDownloadCommands() { | ||||
|     return downloadCommands; | ||||
|   } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user
	 Shawn O. Pearce
					Shawn O. Pearce