官方解釋,請參考:http://www.subversion.org.cn/svnbook/nightly/svn.ref.svn.c.checkout.html
經常使用檢出命令:
svn co http://路徑(目錄或文件的全路徑) [本地目錄全路徑] --username 用戶名 --password 密碼html
svn co svn://路徑(目錄或文件的全路徑) [本地目錄全路徑] --username 用戶名 --password 密碼web
svn checkout http://路徑(目錄或文件的全路徑) [本地目錄全路徑] --username 用戶名
svn checkout svn://路徑(目錄或文件的全路徑) [本地目錄全路徑] --username 用戶名app
注:若是不帶--password 參數傳輸密碼的話,會提示輸入密碼,建議不要用明文的--password 選項。svn
其中 username 與 password前是兩個短線,不是一個。工具
不指定本地目錄全路徑,則檢出到當前目錄下。測試
例子:
svn co svn://192.168.0.3/測試工具 /home/testtools --username lukeui
svn co http://192.168.0.3/test/testapp --username lukegoogle
svn checkout svn://192.168.0.3/測試工具 /home/testtools --username lukespa
svn checkout http://192.168.0.3/test/testapp --username luke
標註本身實驗過的代碼:版本控制
svn checkout http://XXXX/cxb/weijifen/code/trunk/web/XXX /home/cxb/src/XXX
svn checkout http://XXXXX/cxb/weijifen/code/trunk/web/trunk . /home/cxb/src/XXX
檢出指定具體版本:
svn co http://路徑(目錄或文件的全路徑) [本地目錄全路徑] [--revision] --username 用戶名 --password 密碼
svn checkout svn://路徑(目錄或文件的全路徑) [本地目錄全路徑] [--revision] --username 用戶名
svn co [--revision] http://路徑(目錄或文件的全路徑) [本地目錄全路徑] --username 用戶名 --password 密碼
svn checkout [--revision] svn://路徑(目錄或文件的全路徑) [本地目錄全路徑] --username 用戶名
svn checkout http://siphon.googlecode.com/svn/trunk/ siphon -r r791
svn checkout -r r791 http://siphon.googlecode.com/svn/trunk/ siphon
檢出不包括源文件夾根目錄:
好比我要checkout trunk/ 下面的全部文件,可是不包括trunk 文件夾
咱們能夠在svn文件夾後面打個空格,在加個「.」就好了
svn co http://192.168.1.10/svn/project/trunk/ /home/DSP-OPEN
改成:
svn co http://192.168.1.10/svn/project/trunk/ . /home/DSP-OPEN
查看更多關於checkout參數使用的命令:svn help checkout
[root@ltegr ~]# svn help checkout
checkout (co): Check out a working copy from a repository.
usage: checkout URL[@REV]... [PATH]
If specified, REV determines in which revision the URL is first
looked up.
If PATH is omitted, the basename of the URL will be used as
the destination. If multiple URLs are given each will be checked
out into a sub-directory of PATH, with the name of the sub-directory
being the basename of the URL.
If --force is used, unversioned obstructing paths in the working
copy destination do not automatically cause the check out to fail.
If the obstructing path is the same type (file or directory) as the
corresponding path in the repository it becomes versioned but its
contents are left 'as-is' in the working copy. This means that an
obstructing directory's unversioned children may also obstruct and
become versioned. For files, any content differences between the
obstruction and the repository are treated like a local modification
to the working copy. All properties from the repository are applied
to the obstructing path.
See also 'svn help update' for a list of possible characters
reporting the action taken.
Valid options:
-r [--revision] ARG : ARG (some commands also take ARG1:ARG2 range)
A revision argument can be one of:
NUMBER revision number
'{' DATE '}' revision at start of the date
'HEAD' latest in repository
'BASE' base rev of item's working copy
'COMMITTED' last commit at or before BASE
'PREV' revision just before COMMITTED
-q [--quiet] : print nothing, or only summary information
-N [--non-recursive] : obsolete; try --depth=files or --depth=immediates
--depth ARG : limit operation by depth ARG ('empty', 'files',
'immediates', or 'infinity')
--force : force operation to run
--ignore-externals : ignore externals definitions
Global options:
--username ARG : specify a username ARG
--password ARG : specify a password ARG
--no-auth-cache : do not cache authentication tokens
--non-interactive : do no interactive prompting
--trust-server-cert : accept unknown SSL server certificates without
prompting (but only with '--non-interactive')
--config-dir ARG : read user configuration files from directory ARG
--config-option ARG : set user configuration option in the format:
FILE:SECTION:OPTION=[VALUE]
For example:
servers:global:http-library=serf
知識擴展:
一、check out跟check in對應,export跟import對應。
check out導出得到文件後,導出的文件仍處於SVN版本控制中,與版本庫保持關聯,好比你能夠進行Svn Update或者Svn Commit操做。
同時導出文件夾下有一個.svn的隱藏文件夾,存儲着一些版本的元數據信息。export 簡單導出一個版本的數據,導出的文件脫離SVN版本控制,修改後無進行Update和Commit操做。導出文件夾下沒有.svn目錄。
注:若是不帶--password 參數傳輸密碼的話,會提示輸入密碼,建議不要用明文的--password 選項。
其中 username 與 password前是兩個短線,不是一個。
不指定本地目錄全路徑,則檢出到當前目錄下。
例子:
svn co svn://192.168.0.3/測試工具 /home/testtools --username luke
svn co http://192.168.0.3/test/testapp --username luke
svn checkout svn://192.168.0.3/測試工具 /home/testtools --username luke
svn checkout http://192.168.0.3/test/testapp --username luke