Two updates about the slick new apply-patch tool in Ubuntu's bikeshed...
First, it now can take a URL as an argument, first retrieving the patch via wget, and then iterating over it and automatically detecting the patch level.
Second, I spent several hours hacking on the source to patch itself, trying to add support for the automatic strip level detection. I haven't yet succeeded, though, as the iterative approach I use with --dry-run in my wrapper script unfortunately doesn't apply. There's no reentrant function that I can use over and over again. Dry-run is a global variable that's either on, or off for the length of the running of the program. There's special behavior based on the boolean value of dry-run. Anyway, I have filed a bug with the upstream patch project, showing them what I have, and asking if they have advice on if, and how it might be applied directly into the patch source. Stay tuned...
:-Dustin
Heya Dustin, pretty sweet.
ReplyDeleteWould be nifty if I could just give a git commit ID (and either the name of the package or list of possible packages) and have it figure out the patch for me.
Hi Bryce,
ReplyDeleteI'm not sure I understand the implementation vector... Would it google for the git commit hash, or something? Or check the current directory for a git branch? ie, how would it go about finding the relevant patch?