Posts

Showing posts with the label Patch

Apply Svn Patch To Git Repository

Answer : I've had a few issues applying SVN generated patches with git. I'd recommend applying any subversion patches directly with patch command, and use git to verify that said patch was successfully applied. $ patch -p0 < xxx_parser.patch $ git diff @emcconville answer works if you have patch as an executable command in the command line. For others: Go to the svn repo svn diff --git >> gitFormat.patch From your (Copy this file to the) git repo git apply gitFormat.patch

Binary Diff/patch For Large Files On Linux?

Answer : You should probably take a look at the rsync-related tools: rdiff and rdiff-backup . The rdiff command lets you produce a patch file and apply it to some other file. The rdiff-backup command uses this approach to deal with entire directories, but I'm guessing you're working with single-file disk images, so rdiff will be the one to use. xdelta can do everything you want. Fair warning though, if your images aren't very similar, you can end up with a very large patch, because xdelta uses half of the defined memory buffer for finding differences. More information is available at the TuningMemoryBudget wiki page. Increasing the buffer size may help out quite a bit. bsdiff is another option, but it's very RAM hungry and completely inappropriate for anything the size of a disk image. bsdiff is quite memory-hungry. It requires max(17*n,9*n+m)+O(1) bytes of memory, where n is the size of the old file and m is the size of the new file. bspatch ...