pull-revu-source: Update to use dsc.py to get dsc URL

This commit is contained in:
Nathan Handler 2009-08-30 19:51:57 +00:00
parent eb94bb8f7e
commit 72d3f50be2
2 changed files with 9 additions and 12 deletions

6
debian/changelog vendored
View File

@ -1,3 +1,9 @@
ubuntu-dev-tools (0.77) UNRELEASED; urgency=low
* pull-revu-source: Update to use dsc.py to get dsc URL
-- Nathan Handler <nhandler@ubuntu.com> Sun, 30 Aug 2009 19:51:03 +0000
ubuntu-dev-tools (0.76) karmic; urgency=low
[ Nicolas Valcárcel ]

View File

@ -32,24 +32,15 @@ my($help)=0;
GetOptions('help' => \$help);
usage() if($help);
my $url = "http://" . $REVU . "/p/" . $package;
dget(getURL());
dget(constructURL(getPage($url),'dsc'));
sub getPage {
my($url) = @_;
sub getURL {
my($url) = "http://" . $REVU . "/dsc.py?url&package=" . $package;
my($page)=get($url);
die("Could Not Get $url") unless (defined $page);
return $page;
}
sub constructURL {
my($page,$extension) = @_;
my($url) = $page =~ m/a href=\"(.*?\.$extension)\"/im;
die("No URL Ending in $extension") unless(defined $url);
return "http://" . $REVU . $url;
}
sub dget {
my($dsc) = @_;
exec("dget -xu $dsc");