diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2017-02-03 21:48:13 +0000 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2018-06-16 12:25:49 +0100 |
commit | 372dc1a02b45466d68ece5598c76e7749b56e1b2 (patch) | |
tree | 95e9795d864339bc9cb831c280775f46fff1a929 /git-debrebase | |
parent | 684e1dfb2e9cc5816a8488b6ad3d08796ed5f390 (diff) |
git-debrebase: WIP
Diffstat (limited to 'git-debrebase')
-rwxr-xr-x | git-debrebase | 49 |
1 files changed, 27 insertions, 22 deletions
diff --git a/git-debrebase b/git-debrebase index 0fb7c3c..a00b4b5 100755 --- a/git-debrebase +++ b/git-debrebase @@ -18,6 +18,24 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. +# usages: +# git-debrebase launder # prints breakwater tip +# git-debrebase analyse +# git-debrebase start # like ffrebase start + debrebase launder +# git-debrebase new-upstream [-f] UPSTREAM +# git-debrebase <git-rebase options> # does debrebase start if necessary +# +# git-ffrebase start [BASE] # records previous HEAD so it can be overwritten +# # records base for future git-ffrebase +# git-ffrebase set-base BASE +# git-ffrebase <git-rebase options> +# git-ffrebase finish +# git-ffrebase status [BRANCH] +# +# refs/ffrebase-prev/BRANCH BRANCH may be refs/...; if not it means +# refs/ffrebase-base/BRANCH refs/heads/BRANCH + + use strict; use Memoize; @@ -37,9 +55,6 @@ sub cfg ($) { memoize('cfg'); -# usage -# git debrebase launder - sub get_commit ($) { my ($objid) = @_; my ($type,$data) = git_cat_file $objid; @@ -288,6 +303,8 @@ sub launder ($;$) { my $committer_authline = calculate_committer_authline(); in_workarea sub { + mkdir $rd or $!==EEXIST or die $!; + my $current_method; foreach my $cl (qw(Debian), @deb_cl, qw(Upstream), @ups_cl) { if (!ref $cl) { @@ -314,27 +331,15 @@ sub launder ($;$) { my $ch = $cl->{Msg}; $ch =~ s{^tree .*}{tree $newtree}m or confess "$ch ?"; $ch =~ s{^committer .*$}{$committer_authline}m or confess "$ch ?"; - my $newcommit = cmdoutput @git, qw(hash-object -t commit), - $ch."\n".$cl->{Msg}; - - - #my $cdata = <<END; -tree $newtree -author $ + open CD, ">", "$rd/m" or die $!; + print CD $ch, "\n", $cl->{Msg}; or die $!; + close CD or die $!; + my $newcommit = cmdoutput @git, qw(hash-object -t commit), "$rd/m"; + $build = $newcommit; + } }; +} - $r->{FixupUpstreamMerge} = $ - - push @deb_cl, { - $cl, - Type => NonGitNewUpstreamDgitImport, - PreviousBreakwaterMerge => - - - push @phases, [ @deb_cl, @ups_cl ]; - - if (@pseudomerges != 1) { -} chdir $GIT_DIR |