Skip navigation

Hrm, this post is broken with the new theme. Sorry!

Revert to a previous commit in svn via: svn merge -r HEAD:[GOOD_REV] [SVN_SOURCE] where [GOOD_REV] is the revision you want to go back to and [SVN_SOURCE] is the path to your repository.

You can find the [GOOD_REV] via the command: svn log (make sure you svn up first).

You can find the [SVN_SOURCE] via the command: svn info

example:

svn merge -r HEAD:10243 svn+ssh://apphacker@svn.example.com/my/svn/path/to/repo

It’s a little confusing because the command is called ‘merge’ and not revert. Revert is used to revert local changes that have not yet been committed. 

HEAD is the last revision. If you just committed revision number 1234 then HEAD is substitute for 1234. HEAD is a great alias for scripts because maybe you don’t know the current revision number.

Posted via web from Apphacker’s learning curve

Advertisements

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 )

Google+ photo

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

Connecting to %s

%d bloggers like this: