summaryrefslogtreecommitdiff
path: root/dgit
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2019-06-06 16:33:10 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2019-06-28 12:45:38 +0100
commitfe216b34e36c059be82c18cfe850c729e5c8df21 (patch)
tree43260582d2bf37dfa42b35db4ac69b807ca97e91 /dgit
parentb088a2a398b660f125ab01ae1352c8a094141f51 (diff)
dgit: split brain reorg: Slight internal error check improvements
Move the $made_split_brain and $do_split_brain checks outside various conditionals. And change a die to a confess. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'dgit')
-rwxr-xr-xdgit8
1 files changed, 5 insertions, 3 deletions
diff --git a/dgit b/dgit
index 7808fd8..9207874 100755
--- a/dgit
+++ b/dgit
@@ -4565,6 +4565,8 @@ END
}
}
+ confess unless !!$made_split_brain == !!$do_split_brain;
+
changedir $playground;
progress f_ "checking that %s corresponds to HEAD", $dscfn;
runcmd qw(dpkg-source -x --),
@@ -4578,7 +4580,6 @@ END
my $r = system @diffcmd;
if ($r) {
if ($r==256) {
- confess unless !!$made_split_brain == !!$do_split_brain;
my $referent = $made_split_brain ? $dgithead : 'HEAD';
my $diffs = cmdoutput @git, qw(diff --stat), $tree, $dgithead;
@@ -5837,7 +5838,7 @@ sub build_maybe_quilt_fixup () {
# remain dgit-view, rather than master, so subsequent calls to
# unpack_playtree_need_cd_work
# will DTRT, resetting dgit-view.
- die if $made_split_brain;
+ confess if $made_split_brain;
$made_split_brain = 1;
}
chdir '..';
@@ -6771,6 +6772,8 @@ sub build_source {
unlink "$buildproductsdir/$sourcechanges" or $!==ENOENT
or fail f_ "remove %s: %s", $sourcechanges, $!;
}
+ confess unless !!$made_split_brain == !!$do_split_brain;
+
my @cmd = (@dpkgsource, qw(-b --));
my $leafdir;
if (building_source_in_playtree()) {
@@ -6779,7 +6782,6 @@ sub build_source {
# If we are in split brain, there is already a playtree with
# the thing we should package into a .dsc (thanks to quilt
# fixup). If not, make a playtree
- confess unless !!$made_split_brain == !!$do_split_brain;
prep_ud() unless $made_split_brain;
changedir $playground;
unless ($made_split_brain) {