I have an SVN file which is now missing some logic and so I need to go back about 40 revisions to the time when it had the logic I need. Other than trying to view a diff of the file in the command line (very hard to read), is there any way I could get a copy of that file to review so I can study it to recover parts?
They are stored in the svn:log property. You can add the --revprop flag to the various property commands to view & edit this property.
The solution here is to either update your working copy or explicitly provide a revision number to svn log by using the --revision ( -r ) option. svn log also takes a --quiet ( -q ) option, which suppresses the body of the log message. When combined with --verbose ( -v ), it gives just the names of the changed files.
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.
Right-click a file in the Current Folder browser and select Source Control > Revert using SVN. In the Revert Files dialog box, choose a revision to revert to. Select a revision to view information about the change such as the author, date, and log message. Click Revert.
You can update to an older revision:
svn update -r 666 file
Or you can just view the file directly:
svn cat -r 666 file | less
It is also interesting to compare the file of the current working revision with the same file of another revision.
You can do as follows:
$ svn diff -r34 file
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With