summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShawn O. Pearce <sop@google.com>2009-06-01 09:48:45 -0700
committerShawn O. Pearce <sop@google.com>2009-06-01 12:47:34 -0700
commit0cb2b65fb7a9258ac96365aa3861f4cf5c0dc79e (patch)
tree85c440249a1215f560973cc7ad974dbf690c9bb8
parentd7ba11f55fa22e5878c255d4fa00124a4abb4dd3 (diff)
Move use_repo_download to gerrit.config
Signed-off-by: Shawn O. Pearce <sop@google.com>
-rw-r--r--Documentation/config-gerrit.txt19
-rw-r--r--src/main/java/com/google/gerrit/client/reviewdb/SystemConfig.java4
-rw-r--r--src/main/java/com/google/gerrit/pgm/ConvertSystemConfig.java6
-rw-r--r--src/main/java/com/google/gerrit/server/GerritServer.java3
-rw-r--r--src/main/webapp/WEB-INF/sql/upgrade011_012_part2.sql1
5 files changed, 20 insertions, 13 deletions
diff --git a/Documentation/config-gerrit.txt b/Documentation/config-gerrit.txt
index 5932392ed2..432f3bf329 100644
--- a/Documentation/config-gerrit.txt
+++ b/Documentation/config-gerrit.txt
@@ -323,6 +323,17 @@ web location where a `gitweb.cgi` is installed to browse
Gerrit appends any necessary query arguments onto the end of this URL.
For example, "?p=$project.git;h=$commit".
+Section repo
+~~~~~~~~~~~
+
+repo.showDownloadCommand::
++
+If set to true, Gerrit advertises patch set downloads with the
+`repo download` command, assuming that all projects managed by this
+instance are generally worked on with the repo multi-repository tool.
++
+By default, false, as not all instances will deploy repo.
+
Section sshd
~~~~~~~~~~~~
@@ -462,14 +473,6 @@ By default NULL, as the git daemon must be configured externally
by the system administrator, and might not even be running on the
same host as Gerrit.
-use_repo_download::
-+
-If set to `Y`, Gerrit advertises patch set downloads with the
-`repo download` command, assuming that all projects managed by this
-instance are generally worked on with the repo multi-repository tool.
-+
-By default, `N`, as not all instances will deploy repo.
-
canonical_url::
+
The default URL for Gerrit to be accessed through.
diff --git a/src/main/java/com/google/gerrit/client/reviewdb/SystemConfig.java b/src/main/java/com/google/gerrit/client/reviewdb/SystemConfig.java
index 75bdfd4620..59ba7e30f8 100644
--- a/src/main/java/com/google/gerrit/client/reviewdb/SystemConfig.java
+++ b/src/main/java/com/google/gerrit/client/reviewdb/SystemConfig.java
@@ -99,10 +99,6 @@ public final class SystemConfig {
@Column(notNull = false)
public transient String gitBasePath;
- /** Should Gerrit advertise 'repo download' for patch sets? */
- @Column
- public boolean useRepoDownload;
-
/** Identity of the administration group; those with full access. */
@Column
public AccountGroup.Id adminGroupId;
diff --git a/src/main/java/com/google/gerrit/pgm/ConvertSystemConfig.java b/src/main/java/com/google/gerrit/pgm/ConvertSystemConfig.java
index ae4b7c3fad..40b17c8b50 100644
--- a/src/main/java/com/google/gerrit/pgm/ConvertSystemConfig.java
+++ b/src/main/java/com/google/gerrit/pgm/ConvertSystemConfig.java
@@ -67,6 +67,7 @@ public class ConvertSystemConfig {
user(config, rs);
auth(config, rs);
gitweb(config, rs);
+ repo(config, rs);
}
private static void sshd(RepositoryConfig config, ResultSet rs)
@@ -115,6 +116,11 @@ public class ConvertSystemConfig {
copy(config, "gitweb", "url", rs, "gitweb_url");
}
+ private static void repo(RepositoryConfig config, ResultSet rs)
+ throws SQLException {
+ copyBool(config, "repo", "showdownloadcommand", rs, "use_repo_download");
+ }
+
private static void copy(RepositoryConfig config, String section, String key,
ResultSet rs, String colName) throws SQLException {
final String value = rs.getString(colName);
diff --git a/src/main/java/com/google/gerrit/server/GerritServer.java b/src/main/java/com/google/gerrit/server/GerritServer.java
index 8e94b76530..2024919183 100644
--- a/src/main/java/com/google/gerrit/server/GerritServer.java
+++ b/src/main/java/com/google/gerrit/server/GerritServer.java
@@ -667,7 +667,8 @@ public class GerritServer {
r.setUseContributorAgreements(getGerritConfig().getBoolean("auth",
"contributoragreements", false));
r.setGitDaemonUrl(sConfig.gitDaemonUrl);
- r.setUseRepoDownload(sConfig.useRepoDownload);
+ r.setUseRepoDownload(getGerritConfig().getBoolean("repo", null,
+ "showdownloadcommand", false));
r.setUseContactInfo(getContactStoreURL() != null);
r.setLoginType(getLoginType());
diff --git a/src/main/webapp/WEB-INF/sql/upgrade011_012_part2.sql b/src/main/webapp/WEB-INF/sql/upgrade011_012_part2.sql
index 7bfc062bc6..b8887cd932 100644
--- a/src/main/webapp/WEB-INF/sql/upgrade011_012_part2.sql
+++ b/src/main/webapp/WEB-INF/sql/upgrade011_012_part2.sql
@@ -12,3 +12,4 @@ ALTER TABLE system_config DROP COLUMN login_type;
ALTER TABLE system_config DROP COLUMN login_http_header;
ALTER TABLE system_config DROP COLUMN sshd_port;
ALTER TABLE system_config DROP COLUMN use_contributor_agreements;
+ALTER TABLE system_config DROP COLUMN use_repo_download;