Mon, 06 Feb 2012 21:17:50 +0100 mdiff: adjust hunk offsets with --ignore-blank-lines (issue3234) stable
Patrick Mezard <patrick@mezard.eu> [Mon, 06 Feb 2012 21:17:50 +0100] rev 16089
mdiff: adjust hunk offsets with --ignore-blank-lines (issue3234) When diffing the following documents with --ignore-blank-lines (-B): $ cat > a <<EOF > > > > b > x > d > EOF and: $ cat > b <<EOF > b > y > d > EOF the context lines are taken from the first document, even if the lines differ (with -w or -b) or if the number of lines differ (with -B). In the second case, we have to adjust the hunk new lines offsets or we end with inconsistent diffs like (see the @@ offsets): diff -r 0e66aa54f318 a --- a/a +++ b/a @@ -1,4 +1,3 @@ b -x +y d Note that having different context lines in a and b means the diff can be applied but is not invertible. Reported by Nicholas Riley <com-selenic@sabi.net>
Mon, 06 Feb 2012 15:22:43 -0600 merge with stable
Matt Mackall <mpm@selenic.com> [Mon, 06 Feb 2012 15:22:43 -0600] rev 16088
merge with stable
(0) -10000 -3000 -1000 -300 -100 -30 -10 -2 +2 +10 +30 +100 +300 +1000 +3000 +10000 +30000 tip