From 045d8a32a776e32599a7b8a16acf7dad6c061ea5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20Ar=C3=A8s?= Date: Fri, 12 Sep 2014 09:57:11 -0400 Subject: [PATCH] Allow to use --enable-httpd with --slave Slave now support running with the http daemon to be able to use git fetching operations over the http protocol. Change-Id: I3e7adf0d7ba5ff436394de35d08fba6f3b358aed --- Documentation/pgm-daemon.txt | 4 ++-- gerrit-pgm/src/main/java/com/google/gerrit/pgm/Daemon.java | 5 +---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/Documentation/pgm-daemon.txt b/Documentation/pgm-daemon.txt index 3d7dd45441..bcf2b1b722 100644 --- a/Documentation/pgm-daemon.txt +++ b/Documentation/pgm-daemon.txt @@ -37,7 +37,7 @@ to different values. --enable-httpd:: --disable-httpd:: Enable (or disable) the internal HTTP daemon, answering - web requests. Enabled by default. + web requests. Enabled by default when --slave is not used. --enable-sshd:: --disable-sshd:: @@ -51,7 +51,7 @@ to different values. or updates existing ones) or link:cmd-review.html[review] (sets approve marks) are disabled. + -This option automatically implies '--disable-httpd --enable-sshd'. +This option automatically implies '--enable-sshd'. --console-log:: Send log messages to the console, instead of to the standard diff --git a/gerrit-pgm/src/main/java/com/google/gerrit/pgm/Daemon.java b/gerrit-pgm/src/main/java/com/google/gerrit/pgm/Daemon.java index 5be244b15d..8ea508f33b 100644 --- a/gerrit-pgm/src/main/java/com/google/gerrit/pgm/Daemon.java +++ b/gerrit-pgm/src/main/java/com/google/gerrit/pgm/Daemon.java @@ -119,7 +119,7 @@ public class Daemon extends SiteProgram { sshd = false; } - @Option(name = "--slave", usage = "Support fetch only; implies --disable-httpd") + @Option(name = "--slave", usage = "Support fetch only") private boolean slave; @Option(name = "--console-log", usage = "Log to console (not $site_path/logs)") @@ -191,9 +191,6 @@ public class Daemon extends SiteProgram { if (!httpd && !sshd) { throw die("No services enabled, nothing to do"); } - if (slave && httpd) { - throw die("Cannot combine --slave and --enable-httpd"); - } manager.add(GarbageCollectionLogFile.start(getSitePath())); if (consoleLog) {