r57356 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r57355‎ | r57356 | r57357 >
Date:09:50, 4 October 2009
Author:ialex
Status:ok
Tags:
Comment:
* Add --no-extensions option to mwdocgen.php to exclude the extensions directory
* Always exclude .svn directories
Modified paths:
  • /trunk/phase3/maintenance/Doxyfile (modified) (history)
  • /trunk/phase3/maintenance/mwdocgen.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/mwdocgen.php
@@ -61,6 +61,7 @@
6262
6363 /** Variable to get user input */
6464 $input = '';
 65+$exclude = '';
6566
6667 #
6768 # Functions
@@ -129,7 +130,7 @@
130131 * @param $svnstat String: path to the svnstat file
131132 * @param $input String: Path to analyze.
132133 */
133 -function generateConfigFile( $doxygenTemplate, $outputDirectory, $stripFromPath, $currentVersion, $svnstat, $input ){
 134+function generateConfigFile( $doxygenTemplate, $outputDirectory, $stripFromPath, $currentVersion, $svnstat, $input, $exclude ){
134135 global $tmpPath;
135136
136137 $template = file_get_contents( $doxygenTemplate );
@@ -141,6 +142,7 @@
142143 '{{CURRENT_VERSION}}' => $currentVersion,
143144 '{{SVNSTAT}}' => $svnstat,
144145 '{{INPUT}}' => $input,
 146+ '{{EXCLUDE}}' => $exclude,
145147 );
146148 $tmpCfg = str_replace( array_keys( $replacements ), array_values( $replacements ), $template );
147149 $tmpFileName = $tmpPath . 'mwdocgen'. rand() .'.tmp';
@@ -168,6 +170,7 @@
169171 $file = $argv[2];
170172 }
171173 break;
 174+ case '--no-extensions': $input = 6; break;
172175 }
173176 }
174177
@@ -182,6 +185,7 @@
183186 3 : only maintenance
184187 4 : only skins
185188 5 : only a given file
 189+ 6 : all but the extensions directory
186190 OPTIONS;
187191 while ( !is_numeric($input) )
188192 {
@@ -203,6 +207,9 @@
204208 $file = readaline( "Enter file name $mwPath" );
205209 }
206210 $input = $mwPath.$file;
 211+case 6:
 212+ $input = $mwPath;
 213+ $exclude = 'extensions';
207214 }
208215
209216 $versionNumber = getSvnRevision( $input );
@@ -213,7 +220,7 @@
214221 $version = "trunk (r$versionNumber)";
215222 }
216223
217 -$generatedConf = generateConfigFile( $doxygenTemplate, $doxyOutput, $mwPath, $version, $svnstat, $input );
 224+$generatedConf = generateConfigFile( $doxygenTemplate, $doxyOutput, $mwPath, $version, $svnstat, $input, $exclude );
218225 $command = $doxygenBin . ' ' . $generatedConf;
219226
220227 echo <<<TEXT
Index: trunk/phase3/maintenance/Doxyfile
@@ -135,7 +135,7 @@
136136 RECURSIVE = YES
137137 EXCLUDE =
138138 EXCLUDE_SYMLINKS = YES
139 -EXCLUDE_PATTERNS = LocalSettings.php AdminSettings.php
 139+EXCLUDE_PATTERNS = LocalSettings.php AdminSettings.php .svn {{EXCLUDE}}
140140 EXAMPLE_PATH =
141141 EXAMPLE_PATTERNS = *
142142 EXAMPLE_RECURSIVE = NO

Follow-up revisions

RevisionCommit summaryAuthorDate
r57806Follow-up r57356: forgot to document $exclude paramialex08:21, 16 October 2009

Status & tagging log