Improve information message about rebuilding the index

When initialising Gerrit into an existing workspace, the index
should be "rebuilt", not "built".  Change the message accordingly.

Also add a new line at the beginning of the message to make it
stand out from the other information that is being output.  This
is consistent with other warnings such as the warning about
bouncycastle not being bundled.

Change-Id: I2ef5b9e141097da70fafd9dcf266988e9d6aaa27
This commit is contained in:
David Pursehouse
2014-02-06 11:32:12 +09:00
parent fc9d9628cd
commit 331dd5f199

View File

@@ -51,8 +51,11 @@ class InitIndex implements InitStep {
LuceneChangeIndex.setReady(
site, ChangeSchemas.getLatest().getVersion(), true);
} else {
ui.message("The index must be built before starting Gerrit:\n"
+ " java -jar gerrit.war reindex -d site_path\n");
final String message = String.format(
"\nThe index must be %sbuilt before starting Gerrit:\n"
+ " java -jar gerrit.war reindex -d site_path\n",
site.isNew ? "" : "re");
ui.message(message);
initFlags.autoStart = false;
}
}