名称

svn export — 导出一个干净的目录树。

概要

svn export [-r REV] URL[@PEGREV] [PATH]
svn export [-r REV] PATH1[@PEGREV] [PATH2]

描述

The first form exports a clean directory tree from the repository specified by URL—at revision REV if it is given, otherwise at HEAD, into PATH. If PATH is omitted, the last component of the URL is used for the local directory name.

从工作拷贝导出干净目录树的第二种形式是指定PATH1PATH2,所有的本地修改将会保留,但是不再版本控制下的文件不会拷贝。

别名

改变

本地磁盘

是否访问版本库

只有当从URL导出时会访问

选项

--revision (-r) REV
--quiet (-q)
--force
--username USER
--password PASS
--no-auth-cache
--non-interactive
--depth ARG
--config-dir DIR
--native-eol EOL
--ignore-externals

例子

从你的工作拷贝导出(不会打印每一个文件和目录):

$ svn export a-wc my-export
Export complete.

从版本库导出目录(打印所有的文件和目录):

$ svn export file:///var/svn/repos my-export
A  my-export/test
A  my-export/quiz
…
Exported revision 15.

When rolling operating system-specific release packages, it can be useful to export a tree that uses a specific EOL character for line endings. The --native-eol option will do this, but it affects only files that have svn:eol-style = native properties attached to them. For example, to export a tree with all CRLF line endings (possibly for a Windows .zip file distribution):

$ svn export file:///var/svn/repos my-export --native-eol CRLF
A  my-export/test
A  my-export/quiz
…
Exported revision 15.

You can specify LR, CR, or CRLF as a line-ending type with the --native-eol option.