From 185dbecf089c20c82c7cde533cb4995cd22e463d Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Sun, 23 Nov 2008 22:16:43 +0100 Subject: Take into account removed files for obsoleted data Also ripped out the Subversion stuff and made the download links local. (cherry picked from commit 5523ebb7850d99ecf750009b853dad6cb914e9e5) --- tools/upalyzer/analyze.php | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'tools') diff --git a/tools/upalyzer/analyze.php b/tools/upalyzer/analyze.php index 3758eae4..43057af1 100644 --- a/tools/upalyzer/analyze.php +++ b/tools/upalyzer/analyze.php @@ -31,9 +31,8 @@ header("Pragma: no-cache"); List of current updates: $entry_name, 'size' => $entry_size, - 'used' => $entry_used); + 'used' => $entry_used, + 'obsolete' => !$entry_exists); $update['size'] += $entry_size; if ($entry_used) { - $update['used_entry_count']++; - $update['used_size'] += $entry_size; + if ($entry_exists) { + $update['used_entry_count']++; + $update['used_size'] += $entry_size; + } $update_entries[$entry_name] = $update; } @@ -143,20 +146,14 @@ ksort($update_entries); foreach ($update_entries as $entry => $update) { - $exists = file_exists($svn_checkout_path . $entry); + $exists = file_exists($checkout_path . $entry); printf("%-{$update_entry_maxlen}s ", $exists ? "black" : "rgb(100,100,100)", $entry); print_update_name($update, true); - if ($exists) { - // Temporary hack to make URLs to map files work - $entry = str_replace('.tmx.gz', '.tmx', $entry); - - printf(' svn', $svn_url_base, $entry); - if (substr($entry, strlen($entry) - 1) != '/') - printf(' download', $download_url_base, $entry); - } + if ($exists && substr($entry, strlen($entry) - 1) != '/') + printf(' download', $download_url_base, $entry); echo "\n"; } @@ -168,10 +165,13 @@ foreach (array_reverse($updates) as $update) print "\n".$update['file']."\n"; foreach ($update['entries'] as $entry_name => $entry) { - printf("%-{$update_entry_maxlen}s", $entry_name); - if ($entry['used']) { + printf("%s%-{$update_entry_maxlen}s%s", + $entry['obsolete'] ? "" : "", + $entry_name, + $entry['obsolete'] ? "" : ""); + if ($entry['used'] && !$entry['obsolete']) { echo ' *'; - } else { + } elseif (!$entry['obsolete']) { echo ' '; print_update_name($update_entries[$entry_name], false); } -- cgit v1.2.3-70-g09d2