Limit archives to only enabled formats

Refactor the configuration of enabled archives to be known to the
GetArchive REST API handler so it can allow only formats that have
been enabled by the administrator.

Use the order listed in download.archive to configure the web
interface, with no formats enabled if the list is empty.

Default to all archive formats enabled, matching the schemes.

Change-Id: I29436f13bbc6fd4a20a7d9151e7f47186f5fbf4b
This commit is contained in:
Shawn Pearce
2014-03-26 22:00:26 -07:00
parent 3c63cb8463
commit 6edde31009
7 changed files with 88 additions and 68 deletions

View File

@@ -35,10 +35,6 @@ public final class AccountGeneralPreferences {
REPO_DOWNLOAD, PULL, CHECKOUT, CHERRY_PICK, FORMAT_PATCH, DEFAULT_DOWNLOADS
}
public static enum ArchiveFormat {
OFF, TAR, TBZ2, TGZ, TXZ
}
public static enum DateFormat {
/** US style dates: Apr 27, Feb 14, 2010 */
STD("MMM d", "MMM d, yyyy"),