How to “undelete” a deleted folder in Subversion / TortoiseSVN?

前端 未结 6 2139
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-12 15:10

We have accidentally deleted the \'tags\' folder from our Subversion repository where we only intended to delete one specific tag. What is the easiest way to get the \'tags\

6条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-12 16:10

    for the command line enthusiasts:

    • first find the revision number where your delete happened:

      svn log -v http://svnserver/path/to/folderContainingDeletedFolder
      

    say you find that the directory was deleted in revision 999 (btw: you might find it easier to find the revision number with the svn repo browser)

    • copy the folder from revision minus 1

      svn copy http://svnserver/path/to/folderContainingDeletedFolder/deletedFolder@998 http://svnserver/path/to/folderContainingDeletedFolder/deletedFolder -m "undeleted folder"
      

    voilà you're done!

    in your case this might be:

        svn copy http://svnserver/project/tags@998 http://svnserver/project/tags -m "undeleted folder"
    

提交回复
热议问题