Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TortoiseSVN revert vs update

Tags:

tortoisesvn

What's the difference between following?

  1. (right click on the project folder) update to revision XXX
  2. (right click on the log list) revert to this revision
  3. (right click on the log list) revert changes from this revision
like image 330
fifi7 Avatar asked Apr 18 '12 08:04

fifi7


People also ask

What is revert in TortoiseSVN?

If you want to undo all changes you made in a file since the last update you need to select the file, right click to pop up the context menu and then select the command TortoiseSVN → Revert A dialog will pop up showing you the files that you've changed and can revert.

How do I revert back to old revision in TortoiseSVN?

Right click on the selected revision(s), then select Context Menu → Revert changes from this revision. Or if you want to make an earlier revision the new HEAD revision, right click on the selected revision, then select Context Menu → Revert to this revision. This will discard all changes after the selected revision.

What is TortoiseSVN update?

If you want more control over the update process, you should use TortoiseSVN → Update to Revision... instead. This allows you to update your working copy to a specific revision, not only to the most recent one.

What does Revert command do in svn?

Reverts any local changes to a file or directory and resolves any conflicted states. svn revert will not only revert the contents of an item in your working copy, but also any property changes.


1 Answers

  1. (right click on the project folder) update to revision XXX

Your project folder is updated to the revision XXX. After that update, your working copy is not at the latest revision anymore and you can not commit any changes you make. If you want to commit, you have to update your working copy again to HEAD. Which means you can't use this option to undo changes you've already committed but only to get a good look at an earlier time of your working copy. So: use this only to look, not to work.

  1. (right click on the log list) revert to this revision

All changes made up to the right-clicked revision are reverted (undo all from HEAD to rev). The changes are only done in your working copy, which you then can commit if you like.

  1. (right click on the log list) revert changes from this revision

Only the right-clicked revision is reverted. The revisions after the right-clicked one up to HEAD are not reverted. Use this if you only want to undo one single commit, not all commits since a specific revision. Again, since this is a revert: the changes are only done in your working copy, which you then can commit if you like.

like image 82
Stefan Avatar answered Jan 03 '23 00:01

Stefan