diff options
-rwxr-xr-x | git-debrebase | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/git-debrebase b/git-debrebase index 1a62852..c497631 100755 --- a/git-debrebase +++ b/git-debrebase @@ -1277,6 +1277,37 @@ sub cmd_convert_from_gbp () { update_head_checkout $old_head, $work, 'convert-from-gbp'; } +sub cmd_convert_to_gbp_v0 () { + # v0 because very raw; does not make pseudomerges or anything + badusage "no arguments allowed" if @ARGV; + my $head = get_head(); + my $ffq = (ffq_prev_branchinfo())[3]; + my $bw = breakwater_of $head; + fresh_workarea(); + my $out; + in_workarea sub { + runcmd @git, qw(checkout -q -b bw), $bw; + runcmd @git, qw(checkout -q -b patch-queue/bw), $head; + runcmd qw(gbp pq export); + runcmd @git, qw(add debian/patches); + $out = make_commit ['HEAD'], [ + 'Commit patch queue (converted from git-debrebase format)', + '[git-debrebase convert-to-gbp: commit patches]', + ]; + }; + if (defined $ffq) { + runcmd @git, qw(update-ref -m), + "debrebase: converting corresponding main branch to gbp format", + $ffq, $git_null_obj; + } + update_head_checkout $head, $out, "convert to gbp (v0)"; + print <<END or die $!; +git-debrebase: converted to git-buildpackage branch format +git-debrebase: WARNING: do not now run "git-debrebase" any more +git-debrebase: WARNING: doing so would drop all upstream patches! +END +} + sub cmd_downstream_rebase_launder_v0 () { badusage "needs 1 argument, the baseline" unless @ARGV==1; my ($base) = @ARGV; |