21

For a deleted file what's the command to use to view the content of a old revision

E:\Downloads\eeli\eel\eel>svn cat eel-scalable-font.h -r 2
svn: warning: 'eel-scalable-font.h' is not under version control

3 Answers 3

35

You need to use a repository URL (not working copy), and use the @rev syntax. Something like:

svn cat https://myhost/svn/eeli/eel/eel/eel-scalable-font.h@2
1
  • 4
    And, if you don't know the last existing version of the file, you can look for it in the log. Something like this: svn log -l 500 -v | grep -C 10 eel-scalable-font.h
    – tom d
    Dec 14, 2011 at 19:47
3

I think what your looking for is:

svn cat eel-scalable-font.h@2
2
  • 1
    no luck E:\Downloads\eeli\eel\eel>svn cat eel-scalable-font.h@2 svn: warning: 'eel-scalable-font.h' is not under version control But I can view the same in tortoise svn
    – R.D
    Nov 19, 2008 at 4:19
  • This worked for me. Just instead of @2, I put @56374, which was the revision just before the file was deleted.
    – L. Holanda
    Apr 2, 2013 at 17:54
3

ok got it. I hve got to point to the repository rather than the working copy

E:\Downloads\eeld>svn cat file:///E:/Downloads/eel/trunk/eel/eel-scalable-font.h@2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.