Friday, June 19, 2009

svn and patches don't mix

Patch files are no fun. Look at this little bit from the SVN Red Bean Book
In this particular example, there really isn't much difference. But svn merge has special abilities that surpass the patch program. The file format used by patch is quite limited; it's able to tweak file contents only. There's no way to represent changes to trees, such as the addition, removal, or renaming of files and directories. Nor can the patch program notice changes to properties. If Sally's change had, say, added a new directory, the output of svn diff wouldn't have mentioned it at all. svn diff outputs only the limited patch format, so there are some ideas it simply can't express.

I only mention this because I've had a recent hiney bite in the combination of patch and svn.