diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2013-08-16 15:33:30 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2013-08-16 15:33:30 +0100 |
commit | def02420f6d52c96f7f29eac820b01bc1ff52fa4 (patch) | |
tree | 585aa3a67e22da2134a1e547f3428fd59c7aa085 /dgit | |
parent | 906ea98283d24c256b5fc53be45f93c59a0600d8 (diff) |
-p option
Diffstat (limited to 'dgit')
-rwxr-xr-x | dgit | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -432,6 +432,7 @@ sub pull () { sub dopush () { runcmd @git, qw(diff --quiet HEAD); my $clogp = parsechangelog(); + die if defined $package; $package = $clogp->{Source}; my $dscfn = "${package}_$clogp->{Version}.dsc"; stat "../$dscfn" or die "$dscfn $!"; @@ -488,6 +489,7 @@ sub dopush () { sub cmd_clone { my $dstdir; + die if defined $package; if (@ARGV==1) { ($package) = @ARGV; } elsif (@ARGV==2 && $ARGV[1] =~ m#^\w#) { @@ -514,11 +516,16 @@ sub branchsuite () { } sub fetchpullargs () { - my $clogp = parsechangelog(); - $package = $clogp->{Source}; + if (!defined $package) { + my $sourcep = parsecontrol('debian/control'); + $package = $sourcep->{Source}; + } if (@ARGV==0) { $suite = branchsuite(); - $suite ||= $clogp->{Distribution}; + if (!$suite) { + my $clogp = parsechangelog(); + $suite = $clogp->{Distribution}; + } canonicalise_suite(); print "fetching from suite $suite\n"; } elsif (@ARGV==1) { @@ -540,6 +547,7 @@ sub cmd_pull { } sub cmd_push { + die if defined $package; my $clogp = parsechangelog(); $package = $clogp->{Source}; if (@ARGV==0) { @@ -552,6 +560,7 @@ sub cmd_push { } sub cmd_build { + die if defined $package; my $clogp = parsechangelog(); $suite = $clogp->{Distribution}; $package = $clogp->{Source}; |