svn rollback

Sometimes I just wonder why there is no svn rollback… Well, this one should do it:

svn merge -rHEAD:NNNN rep-url working-copy

  • working-copy – path to your working copy.
  • rep-url – URL or path to your repository
  • NNNN – revision you want to rollback to

For instance this command below will merge rev. 2348 into your working copy:

svn merge -rHEAD:2348 svn+ssh:// /home/yourname/project/yourproject

Don’t forget to commit after all conflicts are resolved.