Reputation: 26644
How do I go back to the previous revision of a file in subversion? This might be the second most normal backward operation so it should be easy so why is it not documented clearly? I've already did revert and I need to go back even more. Now if I go back to a spec revision it's not the same as going back to the previous version of the file since just going back a revision might be some other revision than the last changes of that file and the file might be unchanged. Do you know what command I'm looking for?
Upvotes: 1
Views: 695
Reputation: 6754
Upvotes: 0
Reputation: 8886
If you at revision 2
, and you want to revert a file to revision 1
.
You do
svn merge -c -2 my.file
,
OR
svn merge -r 43:4 my.file
and then do svn diff
, it seems to show one revision before 1 (that is, 0);
Only when you do svn merge -c 1 myfile (without the -)
, it looks like myfile is reverted to rev 1.
Upvotes: 2