diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2016-10-09 20:48:57 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2016-10-10 01:01:11 +0100 |
commit | eb2c03527e7dd4ecb52d2b5e5b120ae58560a44f (patch) | |
tree | 79d1188ba5d427388fca8dea6e783611a4c3d08a /dgit | |
parent | f1785c37fb130ec693a50ef7ec46c2dbb2a731a8 (diff) |
Better error message if HEAD contains changes unrepresentable
by `3.0 (quilt)'. Closes:#834618.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'dgit')
-rwxr-xr-x | dgit | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -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 <<END; +HEAD has changes to .orig[s] which are not representable by `3.0 (quilt)' +END + } + my @failsuggestion; if (!($diffbits->{O2H} & $diffbits->{O2A})) { push @failsuggestion, "This might be a patches-unapplied branch."; |