Reputation: 23892
So I've used 'svn revert' somewhat frequently and I always do 'svn up' on the file after reverting the changes I didn't need. Another developer I know told me the svn up isn't necessary after the revert which didn't sound correct to me.
Reverts any local changes to a file or directory and resolves any conflicted states. svn revert will revert not only the contents of an item in your working copy, but also any property changes
-http://svnbook.red-bean.com/en/1.7/svn.ref.svn.c.revert.html
I thought this meant the 'svn revert' pulls the last changes from the '.svn' in my directory and restores from there, not the SVN sever (so the code could still be out of date). Is this correct?
Thanks.
Upvotes: 2
Views: 4466
Reputation: 28144
svn revert
restores the item from the pristine copy in .svn
. If it's been 3 weeks since you last ran svn up
, then your freshly-reverted copy will be 3 weeks old.
Running svn up
regularly is a good habit to have regardless.
Upvotes: 2