You are using subversion (svn) for version control for a web-based software project you are doing. Your svn server is hosted on your laptop behind a DSL with a dynamically allocated IP address. You checkout the head revision on a live server one day, make changes in a few files on the server, and try to commit the changes back to the svn server the next day. Hell ensues. You’re doomed.
Not quite. If you have heavily used svn for version control for your projects, chances are good you might have come across such a problem. No? Well, at least, I did. Since my svn repository is on a system that gets assigned a dynamic IP address every time I power up the DSL and since power outages are all too frequent where I live and since I don’t have a backup solution such as UPS save for a generator, I often run into the sort of svn trouble I described above.
The fix? Three words: svn switch –relocate (jump to the last example).
TortoiseSVN has a similar “relocate” button that does the same thing. I wasn’t familiar with the actual svn command it uses behind the scenes until Tili enlightened me.