File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
src/org/opensolaris/opengrok/index Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 48
48
import org .opensolaris .opengrok .configuration .Configuration ;
49
49
import org .opensolaris .opengrok .configuration .Project ;
50
50
import org .opensolaris .opengrok .configuration .RuntimeEnvironment ;
51
+ import org .opensolaris .opengrok .configuration .messages .Message ;
51
52
import org .opensolaris .opengrok .history .HistoryException ;
52
53
import org .opensolaris .opengrok .history .HistoryGuru ;
53
54
import org .opensolaris .opengrok .history .Repository ;
@@ -582,6 +583,18 @@ public static void main(String argv[]) {
582
583
System .exit (1 );
583
584
}
584
585
586
+ // If the webapp is running with a config that does not contain
587
+ // 'projectsEnabled' property (case of upgrade or transition
588
+ // from project-less config to one with projects), set the property
589
+ // using a message so that the 'project/indexed' messages
590
+ // emitted during indexing do not cause validation error.
591
+ if (addProjects && host != null && port > 0 ) {
592
+ Message m = Message .createMessage ("config" );
593
+ m .addTag ("set" );
594
+ m .setText ("projectsEnabled = true" );
595
+ m .write (host , port );
596
+ }
597
+
585
598
// Get history first.
586
599
getInstance ().prepareIndexer (env , searchRepositories , addProjects ,
587
600
defaultProjects ,
You can’t perform that action at this time.
0 commit comments