On Sat, Oct 8, 2011 at 8:38 PM, Xiang Liu <[email protected]> wrote:
> Hi, everybody > > I have removed a directory by mistake. > > > svn del https://pl3.projectlocker.com/gnwd/notes/svn/a_dir > > So, How can I recover it? > > Thanks. > xiang > Xiang- What I would do is pick a new location on your machine and export the parent directory of where your directory used to be (the svn dir above?) and force the revision number of the repository to be what it was, when a_dir used to exist. If your repo is at -r 10 now but the folder existed at -r 9, do something like: #> cd /other/dir #> svn export https://pl3.projectlocker.com/gnwd/notes/svn -r 9 svn Exported revision 9 now you will have a new svn folder at /other/dir/svn, you can then copy the a_dir inside there back to your working copy and commit it back to the repository cp svn/a_dir /path/to/workingcopy/gnwd/notes/svn/ now if you cd to your working copy dir and do a svn status, you can see these a_dir files are just a new unversioned directory #> cd /path/to/workingcopy/gnwd/notes/svn #> svn add a_dir A foo.c A bar.c etc #> svn commit -m "Restored a_dir" Committed revision 11. Hope that helps -
