[DebianGIS-dev] r1145 - scripts

frankie at alioth.debian.org frankie at alioth.debian.org
Mon Oct 1 11:45:09 UTC 2007


Author: frankie
Date: 2007-10-01 11:45:09 +0000 (Mon, 01 Oct 2007)
New Revision: 1145

Modified:
   scripts/dgis-status.pl
Log:
Adding TODO file support


Modified: scripts/dgis-status.pl
===================================================================
--- scripts/dgis-status.pl	2007-10-01 09:34:10 UTC (rev 1144)
+++ scripts/dgis-status.pl	2007-10-01 11:45:09 UTC (rev 1145)
@@ -27,6 +27,7 @@
 
 use Getopt::Std;
 use FileHandle;
+use SVN::Client;
 
 use AptPkg::Config '$_config';
 use AptPkg::System '$_system';
@@ -37,6 +38,9 @@
 
 push @INC, $ENV{'HOME'}."/pkg-grass/scripts";
 
+my $svn_repo = "svn://svn.debian.org/pkg-grass";
+my $web_repo = "http://svn.debian.org/wsvn/pkg-grass";
+
 require "dgis-packages.inc";
 
 my %wget      = ( 'quiet' => 'wget --passive-ftp --quiet -O ','verbose' => 'wget --passive-ftp -O ' );
@@ -75,6 +79,18 @@
 	exit;
 }
 
+sub GetSvnUrl {
+	my ($source_package,$file_name) = @_;
+
+	eval {
+		my $client = SVN::Client->new(auth => [SVN::Client::get_simple_provider()]); 
+		my $dirent = $client->ls("$svn_repo/packages/$source_package/trunk/debian/$file_name",'HEAD',1);
+	};
+	return undef if $@;
+	return "$web_repo/packages/$source_package/trunk/debian/$file_name?op=file&rev=0&sc=0";
+}
+
+
 unless ($opt_o) {	# Skip wget if -o option "only difference"
 	for my $s ( keys %paths ) {
 		unlink "$s.$sources" if -f "$s.$sources";
@@ -193,6 +209,7 @@
 	my $p_url = "<strong>$p</strong>";
 	my $tr_class = "class='green'";
 	my $pkg_url = $main::dgislist{$p}->{url};
+	my $todo_url = &GetSvnUrl($p,'TODO');
 	if ( $dgishash{$p}->{stable} ne "&nbsp;" || $dgishash{$p}->{unstable} ne "&nbsp;" ) {
 		$p_url .= " (<a href='http://packages.qa.debian.org/$p'>PTS</a>,";
 	}
@@ -201,6 +218,7 @@
 		my $pkg_wnpp = $main::dgislist{$p}->{wnpp};
 		$p_url .= "<a href='http://bugs.debian.org/$pkg_wnpp'>WNPP</a>," if $pkg_wnpp;
 	}
+	$p_url .= "<a href='$todo_url'>TODO</a>," if $todo_url;
 	$p_url .= "<a href='$pkg_url'>UP</a>)" if $pkg_url;
 	if ( $dgishash{$p}->{unstable} ne "&nbsp;" && $dgishash{$p}->{stable} eq "&nbsp;" ) {
 		$tr_class = "class='green'";




More information about the Pkg-grass-devel mailing list