mkdir $rd or $!==EEXIST or die $!;
my $current_method;
foreach my $cl (qw(Debian), (reverse @deb_cl),
+ { SpecialMethod => 'RecordBreakwaterTip' },
qw(Upstream), (reverse @ups_cl)) {
if (!ref $cl) {
$current_method = $cl;
} elsif ($method eq 'StartRewrite') {
$rewriting = 1;
next;
+ } elsif ($method eq 'RecordBreakwaterTip') {
+ last if $wantdebonly;
+ $breakwater = $build;
+ next;
} elsif ($method eq 'DgitImportDebianUpdate') {
$read_tree_debian->($cltree);
$rm_tree_cached(qw(debian/patches));
map { $wantdebonly ? "$_:debian" : $_ },
$input, $build;
- return $build;
+ return ($build, $breakwater);
}
sub get_head () { return git_rev_parse qw(HEAD); }
sub cmd_launder () {
my $old = get_head();
- my $got = launder $old, 0, undef, 0;
- update_head $old, $new, 'launder'; # no tree changes!
+ my ($tip,$breakwater) = launder $old, 0, undef, 0;
+ update_head $old, $tip, 'launder'; # no tree changes!
+ printf "# breakwater tip:\n%s\n", $breakwater;
}
my $toplevel = runcmd @git, qw(rev-parse --show-toplevel);