版本控制:tortoise svn的 revert to this revision和 revert changes from this revision有什么区别?
问题:
The link:
http://tortoisesvn.net/docs/nightly/TortoiseSVN_en/tsvn-howto-rollback.html
describes two ways of rolling back an SVN directory after a wrongful commit. What is the difference between the two options
Revert changes from this revision
Revert to this revision
As a test, I added a file, rolling back using "Revert changes from this revision" and did the same process for the "Revert to this revision", and there is no difference with the state of the SVN log.
Am I missing something?
解答:
Let's say you have these N sucessive commits: 1, 2, 3 and 4.
If you select the commit 2 and choose "Revert to this revision", your working copy will contain the changes brought by commits 1 and 2. Commits 3 and 4 will be "canceled".
If you select the commit 2 and choose "Revert changes from this revision", your working copy will contain the changes brought by commits 1, 3 and 4. Commit 2 will be "canceled", or rather, played in reverse on the top of commit 4: if a line was added, it will be removed. If a line was removed, it will be readded.