名称

svn cat — 输出特定文件或URL的内容。

概要

svn cat TARGET[@REV]...

描述

Output the contents of the specified files or URLs. For listing the contents of directories, see svn list later.

别名

改变

无2

是否访问版本库

选项

--revision (-r) REV
--username USER
--password PASS
--no-auth-cache
--non-interactive
--config-dir DIR

例子

If you want to view readme.txt in your repository without checking it out:

$ svn cat http://svn.red-bean.com/repos/test/readme.txt
This is a README file.
You should read this.

提示

If your working copy is out of date (or you have local modifications) and you want to see the HEAD revision of a file in your working copy, svn cat -r HEAD will automatically fetch the HEAD revision when you give it a path:

$ cat foo.c
This file is in my local working copy 
and has changes that I've made.

$ svn cat -r HEAD foo.c
Latest revision fresh from the repository!