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:
Shawn O. Pearce
2010-12-08 18:30:43 -08:00
parent 13fb707580
commit 89cefced8d
5 changed files with 4 additions and 168 deletions

View File

@@ -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;

View File

@@ -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);
}
}