[Debian-l10n-commits] r1488 - in /dl10n/trunk: Changelog lib/Debian/L10n/BTS.pm

nekral-guest at users.alioth.debian.org nekral-guest at users.alioth.debian.org
Sun Dec 7 19:51:46 UTC 2008


Author: nekral-guest
Date: Sun Dec  7 19:51:46 2008
New Revision: 1488

URL: http://svn.debian.org/wsvn/?sc=1&rev=1488
Log:
	* lib/Debian/L10n/BTS.pm: re-indent.

Modified:
    dl10n/trunk/Changelog
    dl10n/trunk/lib/Debian/L10n/BTS.pm

Modified: dl10n/trunk/Changelog
URL: http://svn.debian.org/wsvn/dl10n/trunk/Changelog?rev=1488&op=diff
==============================================================================
--- dl10n/trunk/Changelog (original)
+++ dl10n/trunk/Changelog Sun Dec  7 19:51:46 2008
@@ -4,6 +4,7 @@
 	BTS tag, and no other status line follow for the pkg, type, file.
 	This will reduce the load on the BTS and reduce the number of
 	mails for the server admins.
+	* lib/Debian/L10n/BTS.pm: re-indent.
 
 2008-11-30  Nicolas François  <nicolas.francois at centraliens.net>
 

Modified: dl10n/trunk/lib/Debian/L10n/BTS.pm
URL: http://svn.debian.org/wsvn/dl10n/trunk/lib/Debian/L10n/BTS.pm?rev=1488&op=diff
==============================================================================
--- dl10n/trunk/lib/Debian/L10n/BTS.pm (original)
+++ dl10n/trunk/lib/Debian/L10n/BTS.pm Sun Dec  7 19:51:46 2008
@@ -101,91 +101,91 @@
 	my $changed = 0; # 0: No changes
 	                 # 1: Updated
 	                 # 2: New status added
-			my ($type, $file, $date, $status_from_db, $translator, $list, $url, $bug_nb) = @{$statusline};
-			my $bugwontfix = 0;
-
-			unless ($seen{$bug_nb}) {
-				my $bugdone = 0;
-				my $content;
-				my $soap_bugs = $soap->get_status($bug_nb)->result();
-				if (not defined $soap_bugs or not length $soap_bugs) {
-					warn "Cannot find bug '$bug_nb' ($pkg: $type#$file)\n";
-					return 0;
-				}
-
-				my $pkg_bug = $soap_bugs->{$bug_nb}->{package};
-				if (    ($pkg_bug ne $pkg)
-				    and ($pkg_bug ne "wnpp")) {
-					print STDERR "Warning: #$bug_nb filled against $pkg_bug but $pkg is in the database\n";
-				}
-				$opendate{$bug_nb} = Date::Format::time2str("%Y-%m-%d %T %z", $soap_bugs->{$bug_nb}->{date}, "GMT");
-				$bugsubmitter{$bug_nb} = parse_submitter($soap_bugs->{$bug_nb}->{originator});
-
-				if (    defined $soap_bugs->{$bug_nb}->{done}
-				    and length $soap_bugs->{$bug_nb}->{done}) {
-					$bugdone = 1;
+	my ($type, $file, $date, $status_from_db, $translator, $list, $url, $bug_nb) = @{$statusline};
+	my $bugwontfix = 0;
+
+	unless ($seen{$bug_nb}) {
+		my $bugdone = 0;
+		my $content;
+		my $soap_bugs = $soap->get_status($bug_nb)->result();
+		if (not defined $soap_bugs or not length $soap_bugs) {
+			warn "Cannot find bug '$bug_nb' ($pkg: $type#$file)\n";
+			return 0;
+		}
+
+		my $pkg_bug = $soap_bugs->{$bug_nb}->{package};
+		if (    ($pkg_bug ne $pkg)
+		    and ($pkg_bug ne "wnpp")) {
+			print STDERR "Warning: #$bug_nb filled against $pkg_bug but $pkg is in the database\n";
+		}
+		$opendate{$bug_nb} = Date::Format::time2str("%Y-%m-%d %T %z", $soap_bugs->{$bug_nb}->{date}, "GMT");
+		$bugsubmitter{$bug_nb} = parse_submitter($soap_bugs->{$bug_nb}->{originator});
+
+		if (    defined $soap_bugs->{$bug_nb}->{done}
+		    and length $soap_bugs->{$bug_nb}->{done}) {
+			$bugdone = 1;
 # TODO: differentiate fixed and done ?
-				} else {
-					$bugwontfix = 1 if ($soap_bugs->{$bug_nb}->{tags} =~ m/\bwontfix\b/);
-				}
-
-				if ($bugdone) {
-					my $bts_url = "$BTS/cgi-bin/bugreport.cgi?bug=$bug_nb'}";
-					my $answer  = $Web_agent -> request(HTTP::Request -> new (GET => $bts_url));
-					return 0 unless $answer -> is_success;
-					$content =  $answer -> content_ref;
-					return 0 unless $$content;
-					$seen{$bug_nb} = 1;
-
-					$$content =~ /(.*?)Message #[0-9]+<\/a> received at (?:submit|maintonly)\@bugs\.debian\.org(.*)/ms;
-
-					my $v = $$content;
-					$v = $1 while ($v =~ /Message #[0-9]+<\/a> received at $bug_nb-(?:close|done)\@bugs\.debian\.org(.*)/ms);
-					$v =~ /^<b>Date:<\/b> (.*)/m;
-					$closedate{$bug_nb} = $1;
-					$closedate{$bug_nb} =
-					Debian::L10n::Utils::parse_date("Date: ".$closedate{$bug_nb} || $date);
-				}
-			}
-
-			if ($closedate{$bug_nb}) {
-				if ($closedate{$bug_nb} ne $date) {
-					$date = $closedate{$bug_nb};
-					$changed = 1 unless $changed == 2;
-				}
-				if ($status_from_db ne 'done') {
-					print "close #$bug_nb of $pkg (at $closedate{$bug_nb})\n";
-					$status_from_db = 'done';
-					$changed = 2;
-				}
-			} else {
-				if ($opendate{$bug_nb} ne $date) {
-					print "fix date of #$bug_nb of $pkg from $date to $opendate{$bug_nb}.\n";
-					$date = $opendate{$bug_nb};
-					$changed = 1 unless $changed == 2;
-				}
-				if ($bugwontfix and $status_from_db ne 'wontfix') {
-					print "wontfix #$bug_nb of $pkg\n";
-					$status_from_db = 'wontfix';
-					$changed = 2;
-				}
-			}
-			if ($bugsubmitter{$bug_nb} ne $translator) {
-				print "fix submitter of #$bug_nb of $pkg from $translator to $bugsubmitter{$bug_nb}.\n";
-				$translator = $bugsubmitter{$bug_nb};
-				$changed = 1 unless $changed == 2;
-			}
-			if ($status_from_db eq 'wontfix' and not $bugwontfix) {
-				print "removing wontfix tag for #$bug_nb of $pkg\n";
-				$status_from_db = 'bts';
-				$changed = 2;
-			}
-
-			if ($changed == 2) {
-				$db->add_status($pkg, $type, $file, $date, $status_from_db, $translator, $list, $url, $bug_nb);
-			} elsif ($changed == 1) {
-				$db->set_status($pkg, $type, $file, $date, $status_from_db, $translator, $list, $url, $bug_nb, $statusline);
-			}
+		} else {
+			$bugwontfix = 1 if ($soap_bugs->{$bug_nb}->{tags} =~ m/\bwontfix\b/);
+		}
+
+		if ($bugdone) {
+			my $bts_url = "$BTS/cgi-bin/bugreport.cgi?bug=$bug_nb'}";
+			my $answer  = $Web_agent -> request(HTTP::Request -> new (GET => $bts_url));
+			return 0 unless $answer -> is_success;
+			$content =  $answer -> content_ref;
+			return 0 unless $$content;
+			$seen{$bug_nb} = 1;
+
+			$$content =~ /(.*?)Message #[0-9]+<\/a> received at (?:submit|maintonly)\@bugs\.debian\.org(.*)/ms;
+
+			my $v = $$content;
+			$v = $1 while ($v =~ /Message #[0-9]+<\/a> received at $bug_nb-(?:close|done)\@bugs\.debian\.org(.*)/ms);
+			$v =~ /^<b>Date:<\/b> (.*)/m;
+			$closedate{$bug_nb} = $1;
+			$closedate{$bug_nb} =
+			Debian::L10n::Utils::parse_date("Date: ".$closedate{$bug_nb} || $date);
+		}
+	}
+
+	if ($closedate{$bug_nb}) {
+		if ($closedate{$bug_nb} ne $date) {
+			$date = $closedate{$bug_nb};
+			$changed = 1 unless $changed == 2;
+		}
+		if ($status_from_db ne 'done') {
+			print "close #$bug_nb of $pkg (at $closedate{$bug_nb})\n";
+			$status_from_db = 'done';
+			$changed = 2;
+		}
+	} else {
+		if ($opendate{$bug_nb} ne $date) {
+			print "fix date of #$bug_nb of $pkg from $date to $opendate{$bug_nb}.\n";
+			$date = $opendate{$bug_nb};
+			$changed = 1 unless $changed == 2;
+		}
+		if ($bugwontfix and $status_from_db ne 'wontfix') {
+			print "wontfix #$bug_nb of $pkg\n";
+			$status_from_db = 'wontfix';
+			$changed = 2;
+		}
+	}
+	if ($bugsubmitter{$bug_nb} ne $translator) {
+		print "fix submitter of #$bug_nb of $pkg from $translator to $bugsubmitter{$bug_nb}.\n";
+		$translator = $bugsubmitter{$bug_nb};
+		$changed = 1 unless $changed == 2;
+	}
+	if ($status_from_db eq 'wontfix' and not $bugwontfix) {
+		print "removing wontfix tag for #$bug_nb of $pkg\n";
+		$status_from_db = 'bts';
+		$changed = 2;
+	}
+
+	if ($changed == 2) {
+		$db->add_status($pkg, $type, $file, $date, $status_from_db, $translator, $list, $url, $bug_nb);
+	} elsif ($changed == 1) {
+		$db->set_status($pkg, $type, $file, $date, $status_from_db, $translator, $list, $url, $bug_nb, $statusline);
+	}
 
 	return $changed;
 }




More information about the Debian-l10n-commits mailing list