2000-04-12 20:34:37 +00:00
|
|
|
#!/usr/bin/perl -w
|
|
|
|
# -*- Mode: perl; indent-tabs-mode: nil -*-
|
|
|
|
|
|
|
|
#
|
|
|
|
# Nautilus
|
|
|
|
#
|
|
|
|
# Copyright (C) 2000 Eazel, Inc.
|
|
|
|
#
|
|
|
|
# This library is free software; you can redistribute it and/or
|
|
|
|
# modify it under the terms of the GNU General Public License as
|
|
|
|
# published by the Free Software Foundation; either version 2 of the
|
|
|
|
# License, or (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This library is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
# General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this library; if not, write to the Free Software
|
|
|
|
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
|
|
#
|
2001-09-15 19:18:15 +00:00
|
|
|
# Author: Darin Adler <darin@bentspoon.com>,
|
2000-04-12 20:34:37 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
# check-FIXME.pl: Search for FIXMEs in the sources and correlate them
|
|
|
|
# with bugs in the bug database.
|
|
|
|
|
|
|
|
use diagnostics;
|
|
|
|
use strict;
|
|
|
|
|
|
|
|
# default to all the files starting from the current directory
|
|
|
|
my %skip_files;
|
|
|
|
if (!@ARGV)
|
|
|
|
{
|
Skip the macros directory.
* check-FIXME.pl: Skip the macros directory.
* libnautilus-extensions/nautilus-directory-async.c:
(async_job_start), (async_job_end), (get_one_value_callback),
(get_one_value), (async_job_wake_up): Add new calls that limit the
number of async. jobs done at once.
(directory_count_cancel), (deep_count_cancel), (mime_list_cancel),
(top_left_cancel), (activation_uri_cancel), (file_info_cancel),
(metafile_read_cancel), (metafile_read_done): End the async. job
if it's cancelled.
(metafile_read_try_public_metafile), (metafile_read_restart):
Changed the old metafile_read_start function's name to
metafile_read_restart since it's used on the second try.
(is_anyone_waiting_for_metafile), (metafile_read_start): Move the
logic about whether to start reading into this function to make it
more like the other jobs. Also start the async. job.
(file_list_cancel): Changed name for consistency and end the
async. job.
(directory_count_callback): End the async. job.
(start_monitoring_file_list): Start the async job.
(file_list_start): Moved logic about when to start loading the file
list into this function to make it more like other jobs.
(directory_count_start): Renamed to make it more like other jobs
and start the async. job.
(deep_count_callback): End the async. job.
(deep_count_start): Start the async. job.
(mime_list_callback): End the async. job.
(mime_list_start): Start the async. job.
(top_left_read_done): End the async. job.
(top_left_start): Start the async. job.
(get_info_callback): End the async. job.
(file_info_start): Start the async. job.
(activation_uri_done): End the async. job.
(activation_uri_start): Start the async. job.
(nautilus_directory_async_state_changed): Wake up directories that
may have breathing from from all the cancellation.
(nautilus_directory_cancel): Moved the cancelling code down here,
remove a directory from the waiting list when it goes, and also
wake up directories that may have breathing room from all the
cancellation.
* libnautilus-extensions/nautilus-directory-private.h: Remove
request_read_metafile from the header.
* libnautilus-extensions/nautilus-directory.c:
(nautilus_directory_destroy): Eliminate the call to
nautilus_directory_stop_monitoring_file_list since that's now
handled by nautilus_directory_cancel.
* libnautilus-extensions/nautilus-file-private.h: Removed the
got_*_mime_type variables since they are the same as *_mime_type
!= NULL.
* libnautilus-extensions/nautilus-file.c: (destroy): Get rid of
checks for NULL before calling g_free.
(nautilus_file_update_info): Replace == FALSE with !. Simplified
some tortuous logic by getting rid of checks for NULL that weren't
needed and booleans that weren't needed.
(get_either_mime_type): Add helper to make it easier to avoid
confusion between default and slow MIME type.
(nautilus_file_compare_by_type): Use get_either_mime_type so it
works when default MIME type is NULL.
(nautilus_file_get_type_as_string): Use get_either_mime_type so it
works when default MIME type is NULL.
(nautilus_file_get_slow_mime_type): Simplified logic. Also got rid
of "application/nonono" which was left here by accident.
(nautilus_file_get_mime_type): Simplified logic and use
get_either_mime_type to share code.
(nautilus_file_is_mime_type): Simplified logic and use
get_either_mime_type to share code.
* src/file-manager/fm-directory-view.c: Format tweaks.
* user-guide/C/Makefile.am: Not so much echoing as we install.
2000-10-17 21:50:19 +00:00
|
|
|
@ARGV = `find . \\( \\( -name po -prune -false \\) -or \\( -name CVS -prune -false \\) -or \\( -name macros -prune -false \\) -or \\( -name '*' -and -type f \\) \\) -and ! \\( -name '*~' -or -name '#*' -or -name 'ChangeLog*' -or -name Entries \\) -print`;
|
2000-05-02 00:50:32 +00:00
|
|
|
%skip_files =
|
|
|
|
(
|
Added HACKING to the files to skip.
* check-FIXME.pl: Added HACKING to the files to skip.
* components/services/install/idl/trilobite-eazel-install.idl:
* components/services/install/lib/eazel-install-corba-callback.c:
(impl_install_failed), (impl_uninstall_failed),
(eazel_install_callback_query):
* components/services/install/lib/eazel-install-corba-types.c:
(corba_packagedatastruct_from_packagedata),
(packagedata_from_corba_packagedatastruct):
* components/services/install/lib/eazel-install-corba.c:
(impl_Eazel_Install_query):
* components/services/install/lib/eazel-install-protocols.c:
(eazel_install_fetch_package),
(eazel_install_fetch_package_which_provides),
(get_url_for_package), (get_search_url_for_package):
* components/services/install/lib/eazel-install-rpm-glue.c:
(eazel_install_do_rpm_transaction_save_report),
(eazel_install_fetch_rpm_dependencies),
(eazel_uninstall_upward_traverse),
(eazel_uninstall_downward_traverse):
* components/services/install/lib/eazel-install-types.c:
(packagedata_destroy_foreach):
* src/file-manager/fm-directory-view.c: (activate_callback):
* src/nautilus-window.c: (nautilus_window_realize):
Fixed "FIXME bugzilla.eazel.com ###:" formatting to match what
check-FIXME.pl looks for. The colon goes after the bug number.
And it has to be "bugzilla.eazel.com", not "bug".
* libnautilus-extensions/nautilus-directory-async.c:
(allow_metafile): Fixed a comment.
* libnautilus-extensions/nautilus-drag.c:
(nautilus_drag_can_accept_item):
Got rid of a fixed FIXME and changed to use
nautilus_file_is_directory instead of nautilus_file_get_file_type.
2000-08-02 19:26:39 +00:00
|
|
|
"./HACKING" => 1,
|
2000-05-02 00:50:32 +00:00
|
|
|
"./TODO" => 1,
|
|
|
|
"./aclocal.m4" => 1,
|
|
|
|
"./check-FIXME.pl" => 1,
|
|
|
|
"./config.sub" => 1,
|
|
|
|
"./libtool" => 1,
|
|
|
|
"./ltconfig" => 1,
|
|
|
|
"./ltmain.sh" => 1,
|
|
|
|
);
|
2000-04-12 20:34:37 +00:00
|
|
|
}
|
|
|
|
|
2000-11-17 01:19:33 +00:00
|
|
|
#locate all of the open FIXMEs in the bug database
|
|
|
|
my $pwd=`pwd`;
|
|
|
|
chomp $pwd;
|
|
|
|
|
|
|
|
my $repository_file = $pwd."/CVS/Repository";
|
|
|
|
open FILE, " cat $repository_file | ";
|
|
|
|
|
|
|
|
my $product = <FILE>;
|
|
|
|
chomp $product;
|
|
|
|
|
|
|
|
close FILE;
|
|
|
|
|
2000-11-29 00:24:32 +00:00
|
|
|
print "Searching the bugzilla database's product $product for open FIXME bugs\n";
|
2000-11-17 01:19:33 +00:00
|
|
|
|
|
|
|
if (!grep /$product/, ( "nautilus", "gnome-vfs", "medusa", "oaf")) {
|
2001-09-15 19:18:15 +00:00
|
|
|
print "Can't find your product in the bugzilla.gnome.org database\n";
|
2000-11-17 01:19:33 +00:00
|
|
|
}
|
|
|
|
|
2001-09-15 19:18:15 +00:00
|
|
|
my $bugzilla_query_bug_url = "http://bugzilla.gnome.org/buglist.cgi?";
|
2000-11-17 01:19:33 +00:00
|
|
|
|
2000-11-17 01:45:39 +00:00
|
|
|
$product =~ s/\-/\+/g;
|
2000-11-17 01:19:33 +00:00
|
|
|
my @cgi_options = ("bug_status=NEW",
|
|
|
|
"bug_status=ASSIGNED",
|
|
|
|
"bug_status=REOPENED",
|
|
|
|
"long_desc=fixme",
|
|
|
|
"long_desc_type=substring",
|
|
|
|
"product=$product");
|
|
|
|
|
|
|
|
my $open_fixmes_url = $bugzilla_query_bug_url.join "&", @cgi_options;
|
|
|
|
|
|
|
|
`wget -q -O - "$open_fixmes_url"` =~ /<INPUT TYPE\=HIDDEN NAME\=buglist VALUE\=([0-9:]+)>/;
|
|
|
|
my $buglist_text = $1;
|
|
|
|
|
|
|
|
my %bugs_in_bugzilla;
|
|
|
|
foreach my $bug (split /:/, $buglist_text) {
|
|
|
|
$bugs_in_bugzilla{$bug} = "UNFOUND";
|
|
|
|
}
|
|
|
|
|
|
|
|
print "Locating all of the FIXME's listed in source\n";
|
2000-04-12 20:34:37 +00:00
|
|
|
# locate all of the target lines
|
2000-04-27 18:36:33 +00:00
|
|
|
my $no_bug_lines = "";
|
2000-04-12 20:34:37 +00:00
|
|
|
my %bug_lines;
|
|
|
|
foreach my $file (@ARGV)
|
|
|
|
{
|
|
|
|
chomp $file;
|
|
|
|
next if $skip_files{$file};
|
|
|
|
next unless -T $file;
|
|
|
|
open(FILE, $file) || die "can't open $file";
|
|
|
|
while (<FILE>)
|
|
|
|
{
|
|
|
|
next if !/FIXME/;
|
2001-09-15 19:18:15 +00:00
|
|
|
if (/FIXME\s*:?\s*bugzilla.gnome.org\s+(\d+)/)
|
2000-04-12 20:34:37 +00:00
|
|
|
{
|
|
|
|
$bug_lines{$1} .= "$file:$.:$_";
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
$no_bug_lines .= "$file:$.:$_";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
close(FILE);
|
|
|
|
}
|
|
|
|
|
2000-11-17 01:19:33 +00:00
|
|
|
# list database bugs we can't find in nautilus
|
|
|
|
printf "%d FIXMES in the database still in $product\n", keys %bug_lines;
|
|
|
|
|
|
|
|
foreach my $bug_number (keys %bug_lines) {
|
|
|
|
$bugs_in_bugzilla{$bug_number} = "FOUND";
|
|
|
|
}
|
|
|
|
|
|
|
|
print "\n";
|
|
|
|
foreach my $bug_number (keys %bugs_in_bugzilla) {
|
|
|
|
if ($bugs_in_bugzilla{$bug_number} eq "UNFOUND") {
|
|
|
|
# Also check that the
|
2001-09-15 19:18:15 +00:00
|
|
|
my $bug_url = "http://bugzilla.gnome.org/show_bug.cgi?id=".$bug_number;
|
2000-11-17 01:19:33 +00:00
|
|
|
my $bug_page = `wget -q -O - $bug_url`;
|
|
|
|
if (!($bug_page =~ /This is not a FIXME bug/i)) {
|
|
|
|
$bug_page =~ /<A HREF=\"bug_status.html\#assigned_to\">Assigned To:<\/A><\/B><\/TD>\s+<TD>([^<]+)<\/TD>/s;
|
|
|
|
print "Bug $bug_number isn't in the source anymore. Contact owner $1.\n";
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2000-04-12 20:34:37 +00:00
|
|
|
# list the ones without bug numbers
|
2000-04-27 18:36:33 +00:00
|
|
|
if ($no_bug_lines ne "")
|
2000-04-12 20:34:37 +00:00
|
|
|
{
|
|
|
|
my @no_bug_list = sort split /\n/, $no_bug_lines;
|
Quick cleanup pass on FIXMEs.
* check-FIXME.pl: Added the count of FIXMEs with bug numbers
as well as the count of FIXMEs without.
* components/services/trilobite/lib/helixcode-utils.c:
(xml_get_value), (prune_xml), (check_for_root_user),
(check_for_redhat), (determine_redhat_version),
(determine_mandrake_version), (determine_turbolinux_version),
(determine_suse_version), (determine_debian_version),
(determine_distribution_type), (get_distribution_name):
A tiny bit of cleanup on these functions. There was some really
bad code in here, including code that compared strings with ==.
Also a lot of code that does open and then no close, for no
good reason, so I added the close.
* libnautilus-extensions/nautilus-file.c: (rename_callback),
(nautilus_file_get_mapped_uri):
* libnautilus-extensions/nautilus-icon-container.c:
(nautilus_icon_container_update_icon):
* libnautilus-extensions/nautilus-icon-dnd.c:
(confirm_switch_to_manual_layout), (nautilus_icon_dnd_begin_drag):
* src/file-manager/fm-icon-view.c: (update_layout_menus),
(sort_callback), (manual_layout_callback):
* src/ntl-view.c: (nautilus_view_destroy_client):
Added bug numbers to some FIXMEs.
2000-05-16 23:22:55 +00:00
|
|
|
print "\n", scalar(@no_bug_list), " FIXMEs don't have bug numbers:\n\n";
|
2000-04-12 20:34:37 +00:00
|
|
|
foreach my $line (@no_bug_list)
|
|
|
|
{
|
|
|
|
print $line, "\n";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
# list the ones with bugs that are not open
|
Quick cleanup pass on FIXMEs.
* check-FIXME.pl: Added the count of FIXMEs with bug numbers
as well as the count of FIXMEs without.
* components/services/trilobite/lib/helixcode-utils.c:
(xml_get_value), (prune_xml), (check_for_root_user),
(check_for_redhat), (determine_redhat_version),
(determine_mandrake_version), (determine_turbolinux_version),
(determine_suse_version), (determine_debian_version),
(determine_distribution_type), (get_distribution_name):
A tiny bit of cleanup on these functions. There was some really
bad code in here, including code that compared strings with ==.
Also a lot of code that does open and then no close, for no
good reason, so I added the close.
* libnautilus-extensions/nautilus-file.c: (rename_callback),
(nautilus_file_get_mapped_uri):
* libnautilus-extensions/nautilus-icon-container.c:
(nautilus_icon_container_update_icon):
* libnautilus-extensions/nautilus-icon-dnd.c:
(confirm_switch_to_manual_layout), (nautilus_icon_dnd_begin_drag):
* src/file-manager/fm-icon-view.c: (update_layout_menus),
(sort_callback), (manual_layout_callback):
* src/ntl-view.c: (nautilus_view_destroy_client):
Added bug numbers to some FIXMEs.
2000-05-16 23:22:55 +00:00
|
|
|
print "\n", scalar(keys %bug_lines), " FIXMEs with bug numbers.\n";
|
2000-04-12 20:34:37 +00:00
|
|
|
sub numerically { $a <=> $b; }
|
|
|
|
foreach my $bug (sort numerically keys %bug_lines)
|
|
|
|
{
|
|
|
|
# Check and see if the bug is open.
|
2001-09-15 19:18:15 +00:00
|
|
|
my $page = `wget -q -O - http://bugzilla.gnome.org/show_bug.cgi?id=$bug`;
|
2000-04-12 20:34:37 +00:00
|
|
|
$page =~ tr/\n/ /;
|
|
|
|
my $status = "unknown";
|
|
|
|
$status = $1 if $page =~ m|Status:.*</TD>\s*<TD>([A-Z]+)</TD>|;
|
|
|
|
next if $status eq "NEW" || $status eq "ASSIGNED" || $status eq "REOPENED";
|
|
|
|
|
|
|
|
# This a bug that is not open, so report it.
|
|
|
|
my @bug_line_list = sort split /\n/, $bug_lines{$bug};
|
|
|
|
print "\nBug $bug is $status:\n\n";
|
|
|
|
foreach my $line (@bug_line_list)
|
|
|
|
{
|
|
|
|
print $line, "\n";
|
|
|
|
}
|
|
|
|
}
|
Quick cleanup pass on FIXMEs.
* check-FIXME.pl: Added the count of FIXMEs with bug numbers
as well as the count of FIXMEs without.
* components/services/trilobite/lib/helixcode-utils.c:
(xml_get_value), (prune_xml), (check_for_root_user),
(check_for_redhat), (determine_redhat_version),
(determine_mandrake_version), (determine_turbolinux_version),
(determine_suse_version), (determine_debian_version),
(determine_distribution_type), (get_distribution_name):
A tiny bit of cleanup on these functions. There was some really
bad code in here, including code that compared strings with ==.
Also a lot of code that does open and then no close, for no
good reason, so I added the close.
* libnautilus-extensions/nautilus-file.c: (rename_callback),
(nautilus_file_get_mapped_uri):
* libnautilus-extensions/nautilus-icon-container.c:
(nautilus_icon_container_update_icon):
* libnautilus-extensions/nautilus-icon-dnd.c:
(confirm_switch_to_manual_layout), (nautilus_icon_dnd_begin_drag):
* src/file-manager/fm-icon-view.c: (update_layout_menus),
(sort_callback), (manual_layout_callback):
* src/ntl-view.c: (nautilus_view_destroy_client):
Added bug numbers to some FIXMEs.
2000-05-16 23:22:55 +00:00
|
|
|
print "\n";
|