jenkins-bot has submitted this change and it was merged. Change subject: Remove svnstat stuff used in Doxygen generation ......................................................................
Remove svnstat stuff used in Doxygen generation Change-Id: I9d8db5fae6e0c99d59fcb9a43d7ed4aab953c300 --- M maintenance/Doxyfile M maintenance/mwdocgen.php 2 files changed, 5 insertions(+), 61 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/maintenance/Doxyfile b/maintenance/Doxyfile index b7c1e5e..5cbcb5f 100644 --- a/maintenance/Doxyfile +++ b/maintenance/Doxyfile @@ -5,7 +5,6 @@ # {{OUTPUT_DIRECTORY}} # {{CURRENT_VERSION}} # {{STRIP_FROM_PATH}} -# {{SVNSTAT}} # {{INPUT}} # # To generate documentation run: php mwdocgen.php --no-extensions @@ -114,7 +113,7 @@ SHOW_DIRECTORIES = YES SHOW_FILES = YES SHOW_NAMESPACES = NO -FILE_VERSION_FILTER = {{SVNSTAT}} +FILE_VERSION_FILTER = LAYOUT_FILE = CITE_BIB_FILES = #--------------------------------------------------------------------------- @@ -174,7 +173,6 @@ *.MM \ *.PY RECURSIVE = YES -EXCLUDE = {{EXCLUDE}} EXCLUDE_SYMLINKS = YES EXCLUDE_PATTERNS = LocalSettings.php AdminSettings.php StartProfiler.php .svn */.git/* {{EXCLUDE_PATTERNS}} EXCLUDE_SYMBOLS = diff --git a/maintenance/mwdocgen.php b/maintenance/mwdocgen.php index 0c3b262..0d9f3ab 100644 --- a/maintenance/mwdocgen.php +++ b/maintenance/mwdocgen.php @@ -57,9 +57,6 @@ /** doxygen configuration template for mediawiki */ $doxygenTemplate = $mwPath . 'maintenance/Doxyfile'; -/** svnstat command, used to get the version of each file */ -$svnstat = $mwPath . 'bin/svnstat'; - /** where Phpdoc should output documentation */ $doxyOutput = $mwPath . 'docs' . DIRECTORY_SEPARATOR ; @@ -100,62 +97,18 @@ } /** - * Copied from SpecialVersion::getSvnRevision() - * @param $dir String - * @return Mixed: string or false - */ -function getSvnRevision( $dir ) { - // http://svnbook.red-bean.com/nightly/en/svn.developer.insidewc.html - $entries = $dir . '/.svn/entries'; - - if ( !file_exists( $entries ) ) { - return false; - } - - $content = file( $entries ); - - // check if file is xml (subversion release <= 1.3) or not (subversion release = 1.4) - if ( preg_match( '/^<\?xml/', $content[0] ) ) { - // subversion is release <= 1.3 - if ( !function_exists( 'simplexml_load_file' ) ) { - // We could fall back to expat... YUCK - return false; - } - - $xml = simplexml_load_file( $entries ); - - if ( $xml ) { - foreach ( $xml->entry as $entry ) { - if ( $xml->entry[0]['name'] == '' ) { - // The directory entry should always have a revision marker. - if ( $entry['revision'] ) { - return intval( $entry['revision'] ); - } - } - } - } - return false; - } else { - // subversion is release 1.4 - return intval( $content[3] ); - } -} - -/** * Generate a configuration file given user parameters and return the temporary filename. * @param $doxygenTemplate String: full path for the template. * @param $outputDirectory String: directory where the stuff will be output. * @param $stripFromPath String: path that should be stripped out (usually mediawiki base path). * @param $currentVersion String: Version number of the software - * @param $svnstat String: path to the svnstat file * @param $input String: Path to analyze. * @param $exclude String: Additionals path regex to exclude * @param $exclude_patterns String: Additionals path regex to exclude * (LocalSettings.php, AdminSettings.php, .svn and .git directories are always excluded) * @return string */ -function generateConfigFile( $doxygenTemplate, $outputDirectory, $stripFromPath, $currentVersion, $svnstat, $input, $exclude, $exclude_patterns ) { - +function generateConfigFile( $doxygenTemplate, $outputDirectory, $stripFromPath, $currentVersion, $input, $exclude, $exclude_patterns ) { global $wgDoxyGenerateMan; $template = file_get_contents( $doxygenTemplate ); @@ -165,7 +118,6 @@ '{{OUTPUT_DIRECTORY}}' => $outputDirectory, '{{STRIP_FROM_PATH}}' => $stripFromPath, '{{CURRENT_VERSION}}' => $currentVersion, - '{{SVNSTAT}}' => $svnstat, '{{INPUT}}' => $input, '{{EXCLUDE}}' => $exclude, '{{EXCLUDE_PATTERNS}}' => $exclude_patterns, @@ -276,20 +228,14 @@ $exclude_patterns = 'extensions'; } -$versionNumber = getSvnRevision( $input ); -if ( $versionNumber === false ) { # Not using subversion ? - $svnstat = ''; # Not really useful if subversion not available - # @todo FIXME - $version = 'trunk'; -} else { - $version = "trunk (r$versionNumber)"; -} +// @todo FIXME to work on git +$version = 'master'; // Generate path exclusions $excludedPaths = $mwPath . join( " $mwPath", $mwExcludePaths ); print "EXCLUDE: $excludedPaths\n\n"; -$generatedConf = generateConfigFile( $doxygenTemplate, $doxyOutput, $mwPath, $version, $svnstat, $input, $excludedPaths, $exclude_patterns ); +$generatedConf = generateConfigFile( $doxygenTemplate, $doxyOutput, $mwPath, $version, $input, $excludedPaths, $exclude_patterns ); $command = $doxygenBin . ' ' . $generatedConf; echo <<<TEXT -- To view, visit https://gerrit.wikimedia.org/r/60832 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9d8db5fae6e0c99d59fcb9a43d7ed4aab953c300 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: REL1_19 Gerrit-Owner: Krinkle <krinklem...@gmail.com> Gerrit-Reviewer: Krinkle <krinklem...@gmail.com> Gerrit-Reviewer: Reedy <re...@wikimedia.org> Gerrit-Reviewer: jenkins-bot _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits