Can't see contents of a file deleted from Subversion repository

前端 未结 1 752
时光说笑
时光说笑 2021-01-22 20:15

A while ago I deleted a file from Subversion repository and now I want to take a look at its contents. I determined that the file was deleted in revision 68, so I tried the foll

1条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-22 20:29

    Try using peg instead operative revision:

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

    Short answer why it works in case of deleted files you can find in SO thread you have already mentioned:

    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.

    Longer answer is in the SVN book: Peg and Operative Revisions.

    0 讨论(0)
提交回复
热议问题