Hint about patches not applying cleanly

Magnus Ihse Bursie magnus.ihse.bursie at oracle.com
Fri Jan 25 10:29:51 UTC 2019


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


More information about the jdk-updates-dev mailing list