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 list (ls) — List directory entries in the repository.
svn list [TARGET[@REV]...]
List each TARGET
file and
the contents of each TARGET
directory as they exist in the repository. If
TARGET
is a working copy path,
the corresponding repository URL will be used.
The default TARGET
is
“.
”, meaning the
repository URL of the current working copy
directory.
With --verbose
(-v
), svn list shows
the following fields for each item:
Revision number of the last commit
Author of the last commit
If locked, the letter “O” (see the preceding section on svn info for details).
Size (in bytes)
Date and time of the last commit
With --xml
, output is in XML format
(with a header and an enclosing document element unless
--incremental
is also specified). All of
the information is present; the --verbose
(-v
) option is not accepted.
svn list is most useful if you want to see what files a repository has without downloading a working copy:
$ svn list http://svn.red-bean.com/repos/test/support README.txt INSTALL examples/ …
You can pass the --verbose
(-v
) option for additional information,
rather like the Unix command
ls -l:
$ svn list -v 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 the section called “Liệt kê danh sách những thư mục được định phiên bản”.