How to save diff to reuse later - the feature similar to shelveset in TFS?

Nam G VU picture Nam G VU · Jun 16, 2011 · Viewed 13.4k times · Source

I make some changes to a file but realize that I need to modify it in other way - this requires me to temporary save my current changes elsewhere and apply it later. How can I do this in svn/subversion tool, e.g. TortoiseSVN?

The feature I'm mentioning is very similar to making shelveset and unshelving it in TFS.

Please help if you know how to. Thank you!

Answer

SolarBear picture SolarBear · Jun 16, 2011

AntonyW's answer works, but it might be overkill, especially if you've got a lot of code !

I'm not familiar with TFS' shelveset but svn gives you the svn diff command to do just what you're looking for: making a diff and saving it so you can apply it later. Just take svn diff's output and save it in a .patch or .diff file.

svn diff myfile > myfile.patch

Since you're using TortoiseSVN, this is even easier to do.