How can I revert/roll back to an earlier version of a file from Subversive?
I'm completely new to source control and Subversive, and I've committed changes to a file that shouldn't have been modified. I've done over an hour of searching documentation and the Internet about this, but I guess I'm not familiar enough with the terminology. Also, a lot of source control resources seem to be for command line users.
Here's what I've tried so far: first, I used the Team > Revert option, but I've since found that that only affect the local copy. I looked at the repository's web interface, but it only provided a diff tool, not a rollback tool. I've also opened the History tab and found "Revert Changes from Revision X" and "Switch to Revision X" in context menus.
Based on the docs I've found, I think one of those is what I need, but I'm not sure which. Also, I don't 开发者_StackOverflowknow whether to select the current revision, because that's the one I want to undo, or the one before it, because that's the one I want to get to. If this were a code problem, I'd just run a little test, but in this case I'm afraid I'll make things worse by selecting the wrong option and I don't want to clutter the repository with a useless test file.
So, in summary: How can I use Subversive to roll back a single file to its immediately previous version?
Revert is the right command. You can not "undo" a commit on the server so that it is not visible. What you need to do is revert the changes from that revision (or revert to the revision before the revision with your changes, I think both options are presented in subclipse's log), which rolls back your working copy to the state it was before, and then commit.
Also: Which is it? Subversive or subclipse?
You can check out the version you want using:
svn co http://example.com/svn/reponame/dir/file.ext -R 123
Or if it wasn't committed, you can use
svn revert file.ext
精彩评论