svn undo

by @jehiah on 2009-05-14 17:02UTC
Filed under: All , Programming

This might seem blatantly obvious in a minute but here is how to svn undo

Most people should be familiar with merging revisions from one code branch to another… you use svn merge

All svn merge does is make a unified diff from revision A to version B. So to merge revision 10 you would use: svn merge -r 9:10 svn://repository/path

The beauty of this is that you can tell it to give you the opposite diff by switching the revision numbers (ie: svn merge -r 10:9 svn://repository/path) which gives you a diff that undoes the changes in revision 10. (aka the diff necessary to go from revision 10 to revision 9)

(I learned this tip via svnbook - common use cases for merging)

Subscribe via RSS ı Email
© 2023 - Jehiah Czebotar