mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-12 16:35:45 +01:00
Previously, when scm-manager was first installed, if you created an hg repository and then tried to click on the link to view the repository, you'd get an error saying that the CGI didn't exist. This was because the CGI was only being written to the .scm/cgi-bin directory when the HgConfig was "set". However, Hg should be perfectly usable with the initial config (assuming that the defaults actually match your system config). Thus, now, scm-manager will write out the CGI upon constructing an initial HgConfig as well.
This commit is contained in:
@@ -42,6 +42,7 @@ import sonia.scm.io.Command;
|
||||
import sonia.scm.io.CommandResult;
|
||||
import sonia.scm.io.SimpleCommand;
|
||||
import sonia.scm.util.IOUtil;
|
||||
import sonia.scm.web.HgWebConfigWriter;
|
||||
|
||||
//~--- JDK imports ------------------------------------------------------------
|
||||
|
||||
@@ -111,6 +112,14 @@ public class HgInitialConfigBuilder
|
||||
config.setRepositoryDirectory(repoDirectory);
|
||||
config.setHgBinary(search("hg"));
|
||||
config.setPythonBinary(search("python"));
|
||||
try {
|
||||
new HgWebConfigWriter(config).write();
|
||||
} catch(IOException ioe) {
|
||||
if(logger.isErrorEnabled()) {
|
||||
logger.error("Could not write Hg CGI for inital config. " +
|
||||
"HgWeb may not function until a new Hg config is set", ioe);
|
||||
}
|
||||
}
|
||||
|
||||
return config;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user