Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+END { $? = $Debian::Dgit::ExitStatus::desired // -1; };
+use Debian::Dgit::ExitStatus;
+
use strict;
use Debian::Dgit qw(:DEFAULT :playground);
use strict;
use Debian::Dgit qw(:DEFAULT :playground);
-sub badcfg { print STDERR "$us: invalid configuration: @_\n"; exit 12; }
+sub badcfg { print STDERR "$us: invalid configuration: @_\n"; finish 12; }
sub forceable_fail ($$) {
my ($forceoptsl, $msg) = @_;
sub forceable_fail ($$) {
my ($forceoptsl, $msg) = @_;
sub no_such_package () {
print STDERR "$us: package $package does not exist in suite $isuite\n";
sub no_such_package () {
print STDERR "$us: package $package does not exist in suite $isuite\n";
sub badusage {
print STDERR "$us: @_\n", $helpmsg or die $!;
sub badusage {
print STDERR "$us: @_\n", $helpmsg or die $!;
}
sub cmd_help () {
print $helpmsg or die $!;
}
sub cmd_help () {
print $helpmsg or die $!;
}
our $td = $ENV{DGIT_TEST_DUMMY_DIR} || "DGIT_TEST_DUMMY_DIR-unset";
}
our $td = $ENV{DGIT_TEST_DUMMY_DIR} || "DGIT_TEST_DUMMY_DIR-unset";
sub {
@end = ();
fetch();
sub {
@end = ();
fetch();
});
# xxx collecte the ref here
});
# xxx collecte the ref here
parseopts();
fetchpullargs();
my $multi_fetched = fork_for_multisuite(sub { });
parseopts();
fetchpullargs();
my $multi_fetched = fork_for_multisuite(sub { });
- exit 0 if $multi_fetched;
+ finish 0 if $multi_fetched;
i_cleanup();
printdebug "all done\n";
i_cleanup();
printdebug "all done\n";
if (!stat "$maindir_gitcommon/logs/refs/$splitbraincache") {
$! == ENOENT or die $!;
printdebug ">(no reflog)\n";
if (!stat "$maindir_gitcommon/logs/refs/$splitbraincache") {
$! == ENOENT or die $!;
printdebug ">(no reflog)\n";
}
I2->error and die $!;
close O or die $1;
}
I2->error and die $!;
close O or die $1;
}
sub maybe_apply_patches_dirtily () {
}
sub maybe_apply_patches_dirtily () {
sub cmd_version {
print "dgit version $our_version\n" or die $!;
sub cmd_version {
print "dgit version $our_version\n" or die $!;
}
our (%valopts_long, %valopts_short);
}
our (%valopts_long, %valopts_short);
if $dryrun_level == 1;
if (!@ARGV) {
print STDERR $helpmsg or die $!;
if $dryrun_level == 1;
if (!@ARGV) {
print STDERR $helpmsg or die $!;
}
$cmd = $subcommand = shift @ARGV;
$cmd =~ y/-/_/;
}
$cmd = $subcommand = shift @ARGV;
$cmd =~ y/-/_/;
my $fn = ${*::}{"cmd_$cmd"};
$fn or badusage "unknown operation $cmd";
$fn->();
my $fn = ${*::}{"cmd_$cmd"};
$fn or badusage "unknown operation $cmd";
$fn->();