From: Ian Jackson Date: Sun, 9 Oct 2016 19:48:57 +0000 (+0100) Subject: Better error message if HEAD contains changes unrepresentable X-Git-Tag: archive/debian/2.0~34 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=dgit.git;a=commitdiff_plain;h=eb2c03527e7dd4ecb52d2b5e5b120ae58560a44f Better error message if HEAD contains changes unrepresentable by `3.0 (quilt)'. Closes:#834618. Signed-off-by: Ian Jackson --- diff --git a/debian/changelog b/debian/changelog index f8363904..5dc62587 100644 --- a/debian/changelog +++ b/debian/changelog @@ -47,6 +47,8 @@ dgit (1.5~~) unstable; urgency=medium * Better error message if non-split-brain patch stack no longer applies (due to new upstream version, or user messing with it). Closes:#833025. + * Better error message if HEAD contains changes unrepresentable + by `3.0 (quilt)'. Closes:#834618. Infrastructure: * Better error handling in dgit-repos-policy-debian. diff --git a/dgit b/dgit index aa9447ff..1208b124 100755 --- a/dgit +++ b/dgit @@ -4522,11 +4522,13 @@ END # be. This is mostly for error reporting. my %editedignores; + my @unrepres; my $diffbits = { # H = user's HEAD # O = orig, without patches applied # A = "applied", ie orig with H's debian/patches applied - O2H => quiltify_trees_differ($unapplied,$headref, 1,\%editedignores), + O2H => quiltify_trees_differ($unapplied,$headref, 1, + \%editedignores, \@unrepres), H2A => quiltify_trees_differ($headref, $oldtiptree,1), O2A => quiltify_trees_differ($unapplied,$oldtiptree,1), }; @@ -4548,6 +4550,14 @@ END $dl[0], $dl[1], $dl[3], $dl[4], $dl[2], $dl[5]; + if (@unrepres) { + print STDERR "dgit: cannot represent change: $_->[1]: $_->[0]\n" + foreach @unrepres; + fail <{O2H} & $diffbits->{O2A})) { push @failsuggestion, "This might be a patches-unapplied branch.";