How to easily back-out any Subversion revision

My colleague David Kemp taught me a very useful technique yesterday: how to easily back-out (ie erase) the effect of one or more Subversion commits, even when those commits happened in the past and are not at the “tip” of the repository. Barring merge problems, its as if those commits never happened.

merge -r243:242 file:///c:/projects/arcadia/Development/Repository/Arcadia

Note how in this command, we merge from a higher number revision backward to a lower number, on the same branch. This creates working copy modifications with the changes contained in Revision 243 undone.

Here’s a screenshot from within Eclipse:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.