chiark / gitweb /
git-debrebase: suppress gbp pq export output
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 20 Jun 2018 15:35:20 +0000 (16:35 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 20 Jun 2018 15:35:37 +0000 (16:35 +0100)
Except in case of error.  Closes:#901809.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
debian/changelog
git-debrebase

index fc7aebb8f976e44844a17668055251ffbcbb28eb..c49b783e1153a8d9b07bf89c732ddc9cce83fad4 100644 (file)
@@ -3,6 +3,8 @@ dgit (5.1~) unstable; urgency=medium
   * git-debrebase manpages: Fix typos and etc.
   * git-debrebase: new-upstream: fix (this time for sure) ff check
     handling of multi-piece upstreams.
+  * git-debrebase: suppress gbp pq export output, except in
+    case of error.  Closes:#901809.
 
  --
 
index 3458b12f5d86d93c2de804989afbed423cc43e92..fd05c6b46a67ab92e2db225e198910d17cb5c9ec 100755 (executable)
@@ -34,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 File::Copy;
 
 our ($opt_force, $opt_noop_ok, @opt_anchors);
 our ($opt_defaultcmd_interactive);
@@ -1495,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;
-       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);
     };
 }