svn list — 列出版本库目录的条目。
列出每一个TARGET
文件和TARGET
目录的内容,如果TARGET
是工作拷贝路径,会使用对应的版本库URL。
缺省的TARGET
是“.
”,意味着当前工作拷贝的版本库URL。
如果一个客户端连接到svnserve进程,如下事情会发生:
最后一次提交的修订版本号
最后一次提交的作者
如果锁定,字符为“O”(更多细节见svn info)
大小(单位字节)
最后提交的日期时间
使用选项--xml
,输出是XML格式(如果没有指定--incremental
,会包括一个头和一个围绕的元素)。会展示所有的信息;不接受--verbose
选项。
--revision (-r) REV --verbose (-v) --depth ARG --incremental --xml --username USER --password PASS --no-auth-cache --non-interactive --config-dir DIR
如果你希望在没有下载工作拷贝时查看版本库有哪些文件,svn list会非常有用:
$ svn list http://svn.red-bean.com/repos/test/support README.txt INSTALL examples/ …
You can pass the --verbose
option for
additional information, rather like the Unix command
ls -l:
$ svn list --verbose file:///var/svn/repos 16 sally 28361 Jan 16 23:18 README.txt 27 sally 0 Jan 18 15:27 INSTALL 24 harry Jan 18 11:27 examples/
You can also get svn list output in
xml format with the --xml
option:
$ svn list --xml http://svn.red-bean.com/repos/test <?xml version="1.0"?> <lists> <list path="http://svn.red-bean.com/repos/test"> <entry kind="dir"> <name>examples</name> <size>0</size> <commit revision="24"> <author>harry</author> <date>2008-01-18T06:35:53.048870Z</date> </commit> </entry> ... </list> </lists>
For further details, see the earlier section “ svn list ”一节.