Personal tools




Svn-report.pl

From OrganicDesign Wiki

Jump to: navigation, search
#!/usr/bin/perl
# Read meta data from an SVN repository into a file
# 
 
$url = 'http://svn.wikimedia.org/viewvc/mediawiki';
 
# Todo: Make files name determined by url
$out = '/var/www/svn-report.txt';
 
# Set up a user agent
use HTTP::Request;
use LWP::UserAgent;
$client = LWP::UserAgent->new(
        cookie_jar => {},
        agent => 'Mozilla/5.0',
        from => 'svn-report.pl@organicdesign.co.nz',
        timeout => 10,
        max_size => 20000
        );
 
$found = true;
 
# Todo: Start at last processed revision in $out
$revision = 1;
 
while ($found) {
	$revision++;
	$response = $client->get("$url?view=rev&revision=$revision");
	$content = $response->content;
	if ($content =~ /UNIQ15df5e4036f6ce61-pre-00000001-QINU

The GNU Project Debian Linux Ubuntu Linux Wikipedia Affiliate Button MediaWiki