chiark
/
gitweb
/
~ianmdlvl
/
dgit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
git-debrebase: suppress gbp pq export output
[dgit.git]
/
git-debrebase
diff --git
a/git-debrebase
b/git-debrebase
index 1295360d8a6f85c0b73a7525c256ac512e495163..fd05c6b46a67ab92e2db225e198910d17cb5c9ec 100755
(executable)
--- a/
git-debrebase
+++ b/
git-debrebase
@@
-19,6
+19,7
@@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
END { $? = $Debian::Dgit::ExitStatus::desired // -1; };
# along with this program. If not, see <http://www.gnu.org/licenses/>.
END { $? = $Debian::Dgit::ExitStatus::desired // -1; };
+use Debian::Dgit::GDR;
use Debian::Dgit::ExitStatus;
use strict;
use Debian::Dgit::ExitStatus;
use strict;
@@
-33,6
+34,7
@@
use Data::Dumper;
use Getopt::Long qw(:config posix_default gnu_compat bundling);
use Dpkg::Version;
use File::FnMatch qw(:fnmatch);
use Getopt::Long qw(:config posix_default gnu_compat bundling);
use Dpkg::Version;
use File::FnMatch qw(:fnmatch);
+use File::Copy;
our ($opt_force, $opt_noop_ok, @opt_anchors);
our ($opt_defaultcmd_interactive);
our ($opt_force, $opt_noop_ok, @opt_anchors);
our ($opt_defaultcmd_interactive);
@@
-1128,7
+1130,7
@@
sub do_stitch ($;$) {
stitch($dangling_head, $ffq_prev, $gdrlast, $ffq_prev_commitish, $prose);
}
stitch($dangling_head, $ffq_prev, $gdrlast, $ffq_prev_commitish, $prose);
}
-sub cmd_new_upstream
_v0
() {
+sub cmd_new_upstream () {
# automatically and unconditionally launders before rebasing
# if rebase --abort is used, laundering has still been done
# automatically and unconditionally launders before rebasing
# if rebase --abort is used, laundering has still been done
@@
-1215,11
+1217,13
@@
sub cmd_new_upstream_v0 () {
) {
my @oldpieces = (split / /, $1);
my $old_n_parents = scalar @{ $old_upstream->{Parents} };
) {
my @oldpieces = (split / /, $1);
my $old_n_parents = scalar @{ $old_upstream->{Parents} };
- if (@oldpieces != $old_n_parents) {
+ if ($old_n_parents != @oldpieces &&
+ $old_n_parents != @oldpieces + 1) {
snag 'upstream-confusing', sprintf
"previous upstream combine %s".
snag 'upstream-confusing', sprintf
"previous upstream combine %s".
- " mentions %d pieces (each implying one orig commit)".
- " but has %d parents",
+ " mentions %d pieces (each implying one parent)".
+ " but has %d parents".
+ " (one per piece plus maybe a previous combine)",
$old_upstream->{CommitId},
(scalar @oldpieces),
$old_n_parents;
$old_upstream->{CommitId},
(scalar @oldpieces),
$old_n_parents;
@@
-1232,7
+1236,8
@@
sub cmd_new_upstream_v0 () {
$oldpieces[0] = '';
foreach my $i (0..$#oldpieces) {
my $n = $oldpieces[$i];
$oldpieces[0] = '';
foreach my $i (0..$#oldpieces) {
my $n = $oldpieces[$i];
- $piece->($n, Old => $old_upstream->{CommitId}.'^'.($i+1));
+ my $hat = 1 + $i + ($old_n_parents - @oldpieces);
+ $piece->($n, Old => $old_upstream->{CommitId}.'^'.$hat);
}
}
} else {
}
}
} else {
@@
-1491,7
+1496,12
@@
sub make_patches_staged ($) {
in_workarea sub {
runcmd @git, qw(checkout -q -b bw), $secret_bw;
runcmd @git, qw(checkout -q -b patch-queue/bw), $secret_head;
in_workarea sub {
runcmd @git, qw(checkout -q -b bw), $secret_bw;
runcmd @git, qw(checkout -q -b patch-queue/bw), $secret_head;
- runcmd qw(gbp pq export);
+ my @gbp_cmd = (qw(gbp pq export));
+ my $r = system shell_cmd 'exec >../gbp-pq-err 2>&1', @gbp_cmd;
+ if ($r) {
+ { local ($!,$?); copy('../gbp-pq-err', \*STDERR); }
+ failedcmd @gbp_cmd;
+ }
runcmd @git, qw(add debian/patches);
};
}
runcmd @git, qw(add debian/patches);
};
}