Some useful advice especially when backporting! Obviously, a careful
manual code review should be applied afterward.
Cheers,
Martijn
---------- Forwarded message ---------
From: Magnus Ihse Bursie <magnus.ihse.bursie at oracle.com>
Date: Fri, 25 Jan 2019 at 10:30
Subject: Hint about patches not applying cleanly
To: <jdk-updates-dev at openjdk.java.net>, <jdk8u-dev at openjdk.java.net>
I just thought I should share a hint about a useful tool, that is not
near enough well known.
The tool in question is called "wiggle".[1] (On Debian derivatives,
"apt-get install wiggle" will do the trick.) When "patch" fails to apply
a patch, wiggle most often succeeds. Patch can be very sensitive to
irrelevant changes (like the line numbers have changed too much), and
without wiggle, you'd be sitting there, trying to adapt the diff
yourself by hand. Wiggle makes an "intelligent" effort of applying the
patch, and tries much harder than patch. Of course, there's always a
risk that wiggle fails, and every time you use it, you should manually
verify the results.
Please note that if a patch fails to apply cleanly, then you still need
to follow the rules for the Update Project and send a RFR, even if it
applies using wiggle. But if you've used wiggle, please mention this in
the review email, since it will increase the reviewers confidence in the
patch.
/Magnus
[1] https://github.com/neilbrown/wiggle