I haven't been working with SVN that long, but the more I use it, the more I think I couldn't develop properly without it. Today I ran into an issue that I knew would crop up at some point, but for some reason never had. Let me set the scene:
I'm currently working on a large project which is in the final stages of development. There's an API being called by another company, and any changes they require means another deployment to the testing environment, and usually they need to be pretty snappy. So I'm developing away in my little development corner, refactoring a fair chunk of the code base, when a request comes in for an extra field to be returned in a call. Simple enough, however I've made about 6 other inter-related changes on that file and if I commit it, it's going to break everything.
On a system that's already previously been developed and has a trunk to be deployed, I'd go with the "make the change to the trunk, deploy, and merge" option, however this project isn't at that stage. Making a whole new branch would be more hassle than it's worth. Enter 'Create Patch'.
When creating a patch in Eclipse, it in essence dumps a diff of the files you want to patch into a text file, and that's it. End of. When applying that patch back to the project, it shows you the changes and allows you to merge them back in. This was perfect. All I had to do was create a patch for my single file, revert back to the head revision, make my simple change, commit it, and apply my single patch back onto the file.
If anyone else has other scenarios that creating a patch is useful in, I'd definitely like to know more!
Like what you've read?