开发者

svn revert to previous version

One of the programmer in my team deleted a folder from svn accidentally. Instead of reverting to previous version he manually creating the entire directory copied the files in the directory and committed. So we l开发者_如何学Cost the history for folder. How do we get back the history ?

Let me explain by example, don't go by syntax

svn log directory
revision 4
revision 3
revision 2
revision 1
- svn remove directory(delete at head i.e revision 4)
- svn commit
- svn add directory (contains recursive directory structure with all the files of rev 4)
- svn commit
- svn log directory 
revision 1

Boom we lost all the revision history, yes we can get the revision history by svn merge. Now we want to move back to a previous version (revision 2) of that directory. What is the best way to do it?


  1. Delete directory again, commit
  2. Perform svn copy http://server/path/to/dir@NNN dir (where NNN is the revision when the correct directory existed) and commit
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜