examining history of deleted file

前端 未结 17 1838
臣服心动
臣服心动 2020-11-30 17:36

If I delete a file in Subversion, how can I look at it\'s history and contents? If I try to do svn cat or svn log on a nonexistent file, it complai

17条回答
  •  眼角桃花
    2020-11-30 18:06

    When you want to look at old files you really should know the difference between:

    svn cat http://server/svn/project/file -r 1234
    

    and

    svn cat http://server/svn/project/file@1234
    

    The first version looks at the path that is now available as http://server/svn/project/file and retrieves that file as it was in revision 1234. (So this syntax does not work after a file delete).

    The second syntax gets the file that was available as http://server/svn/project/file in revision 1234. So this syntax DOES work on deleted files.

    You can even combine these methods to retrieve a file that was available in revision 2345 as http://server/svn/project/file but with the contents as it had in 1234 with:

    svn cat http://server/svn/project/file@2345 -r 1234
    

提交回复
热议问题