This text is a work in progress—highly subject to change—and may not accurately describe any released version of the Apache™ Subversion® software. Bookmarking or otherwise referring others to this page is probably not such a smart idea. Please visit http://www.svnbook.com/ for stable versions of this book.
svn cat — 输出指定的文件的内容.
svn cat
TARGET
[@REV
]...
如果你想查看仓库里的 readme.txt
文件, 但又不
想把它检出, 可以这样做:
$ svn cat http://svn.red-bean.com/repos/test/readme.txt This is a README file. Don't bother reading it. The boss is a knucklehead. INSTRUCTIONS ============ Step 1: Do this. Step 2: Do that. $
还可以查看文件在特定版本号下的内容:
$ svn cat -r 3 http://svn.red-bean.com/repos/test/readme.txt This is a README file. INSTRUCTIONS ============ Step 1: Do this. Step 2: Do that. $
注意 | |
---|---|
你可能很自然地想到用 svn cat 查看工作副本中的
文件, 但是要注意的是 svn cat 用在工作副本文件上的
默认限定版本号是 |
提示 | |
---|---|
如果工作副本已经过期了 (或者含有本地修改), 而你想查看文件在
版本号 |