If you delete a directory from an SVN working copy, but haven't committed yet, it's not obvious how to get it back. Google even suggests "svn undo delete before commit" as a common query when you type "svn undo d", but the search results are unhelpful.
edit: I'd like a solution that works in subversion 1.4.4
Right click on the selected revision(s), then select Context Menu → Revert changes from this revision. Or if you want to make an earlier revision the new HEAD revision, right click on the selected revision, then select Context Menu → Revert to this revision.
To revert a single commit: Go to: Subversion -> Integrate Directory... Show activity on this post. Note that the svn merge command reverts a commit in the sense of having another commit undoing your changes, but keeping your wrong commit in the history.
On the file, simply right-click => Team => Switch to another branch/tag/revision. Besides the revision field, you click select, and you'll see all the versions of that file.
1) do
svn revert . --recursive
2) parse output for errors like
"Failed to revert 'dir1/dir2' -- try updating instead."
3) call svn up for each of error directories:
svn up dir1/dir2
svn revert deletedDirectory
Here's the documentation for the svn revert
command.
If deletedDirectory
was deleted using rmdir
and not svn rm
, you'll need to do
svn update deletedDirectory
instead.
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