die $@ if $@;
}
-sub fresh_workarea () {
- $workarea = fresh_playground "$playprefix/work";
+sub fresh_workarea (;$) {
+ my ($subdir) = @_;
+ $subdir //= 'work';
+ $workarea = fresh_playground "$playprefix/$subdir";
in_workarea sub { playtree_setup };
}
# our own patch identification algorithm?
# this is an alternative strategy
-sub merge_failed ($$) {
- my ($wrecknotes, $emsg) = @_;
+sub merge_failed ($$;@) {
+ my ($wrecknotes, $emsg, @xmsgs) = @_;
my @m;
push @m, "Merge resolution failed: $emsg";
+ push @m, @xmsgs;
changedir $maindir;
debugcmd '+', @_;
$!=0; $?=-1;
if (system @_) {
- failedcmd_report_cmd undef, @_;
- merge_failed $wrecknotes, failedcmd_waitstatus();
+ merge_failed $wrecknotes,
+ failedcmd_waitstatus(),
+ "failed command: @_";
}
};
- local $workarea = fresh_playground "$playprefix/merge";
+ local $workarea;
+ fresh_workarea "merge";
my $seriesfile = "debian/patches/series";
in_workarea sub {
playtree_setup();