Remove the GitProjectImporter
Since projects are listed by recursively walking the filesystem, we don't need to import them into the database. Change-Id: I86613ac34a9c0ac68ba82b70b2c0312f877a8e69 Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
@@ -30,9 +30,6 @@ public class InitFlags {
|
||||
/** Recursively delete the site path if initialization fails. */
|
||||
public boolean deleteOnFailure;
|
||||
|
||||
/** Run the Git project importer after initialization. */
|
||||
public boolean importProjects;
|
||||
|
||||
/** Run the daemon (and open the web UI in a browser) after initialization. */
|
||||
public boolean autoStart;
|
||||
|
||||
|
||||
@@ -25,14 +25,11 @@ import java.io.File;
|
||||
/** Initialize the GitRepositoryManager configuration section. */
|
||||
@Singleton
|
||||
class InitGitManager implements InitStep {
|
||||
private final InitFlags flags;
|
||||
private final ConsoleUI ui;
|
||||
private final Section gerrit;
|
||||
|
||||
@Inject
|
||||
InitGitManager(final InitFlags flags, final ConsoleUI ui,
|
||||
final Section.Factory sections) {
|
||||
this.flags = flags;
|
||||
InitGitManager(final ConsoleUI ui, final Section.Factory sections) {
|
||||
this.ui = ui;
|
||||
this.gerrit = sections.get("gerrit");
|
||||
}
|
||||
@@ -44,11 +41,7 @@ class InitGitManager implements InitStep {
|
||||
if (d == null) {
|
||||
throw die("gerrit.basePath is required");
|
||||
}
|
||||
if (d.exists()) {
|
||||
if (!flags.importProjects && d.list() != null && d.list().length > 0) {
|
||||
flags.importProjects = ui.yesno(true, "Import existing repositories");
|
||||
}
|
||||
} else if (!d.mkdirs()) {
|
||||
if (!d.exists() && !d.mkdirs()) {
|
||||
throw die("Cannot create " + d);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user