SVN常用命令之checkout

SVN常用命令之checkout

官方解释,请参考:http://www.subversion.org.cn/svnbook/nightly/svn.ref.svn.c.checkout.html

常用检出命令:

svn co http://路径(目录或文件的全路径) [本地目录全路径]  –username 用户名 –password 密码

svn co svn://路径(目录或文件的全路径) [本地目录全路径]  –username 用户名 –password 密码

svn checkout http://路径(目录或文件的全路径) [本地目录全路径] –username 用户名

svn checkout svn://路径(目录或文件的全路径) [本地目录全路径]  –username 用户名

 

注:如果不带–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

 

标注自己实验过的代码:

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

 


知识扩展:
1、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

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/113249.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • 古典概率c30怎么算_概率分为古典概率和什么概率

    古典概率c30怎么算_概率分为古典概率和什么概率》》点赞,收藏+关注,理财&技术不迷路《《目录:3.古典概率ClassicalProbability频率概率:古典概型:这个例子,n的区别就是指定和没有指定。后面365*364*******意思是每个人的生日都不一样,就是一个排列。题目要求的至少两人,它的对立面就是少于两人,那意思就是每一个人的生日都不一样。4.几何概率geometricprobability面积示例:思考下面这种问题方式,不用从几何导代数,要依靠几..

    2022年10月19日
    3
  • 关于pycharm下载tensorflow时报错解决「建议收藏」

    关于pycharm下载tensorflow时报错解决「建议收藏」1.查看pip工具是否需要更新2.点击settings,进入pythoninterperter,对pip进行更新3.可以双击上箭头进行更新,也可以点击加号搜索pip进行更新

    2022年8月27日
    5
  • java游戏开发实例,吐血整理「建议收藏」

    java游戏开发实例,吐血整理「建议收藏」专题1:JavaOOP1、什么是B/S架构?什么是C/S架构2、Java都有哪些开发平台?3、什么是JDK?什么是JRE?4、Java语言有哪些特点5、面向对象和面向过程的区别6、什么是数据结构?7、Java的数据结构有哪些?8、什么是OOP?9、类与对象的关系?10、Java中有几种数据类型11、标识符的命名规则。12、instanceof关键字的作用13、什么是隐式转换,什么是显式转换14、Char类型能不能转成int类

    2022年7月7日
    42
  • pyecharts画图_vue 数据可视化

    pyecharts画图_vue 数据可视化Python3的Pyecharts制作**Sunburst(旭日图)**时需要使用的设置参数和常用模板案例,可根据实际情况对案例中的内容进行调整即可。

    2022年9月26日
    2
  • linux系统怎么利用LVM扩容

    linux系统怎么利用LVM扩容引言:在linux系统下,如果在虚拟机层面进行扩容,首先是挂载一块虚拟机硬盘,然后在linux系统底下去分区,然后对挂载到新的目录,但是,如果是对linux系统里面的文件目录本身进行扩容的话,只能使用LVM来进行扩容,本文将分两部分介绍,第一部分是如何创建LVM的分区,第二部分是如何对文件目录本身利用LVM来进行扩容:创建LVM分区:1如下图,我这里有一块硬盘已经分区,如果直接对这块硬盘创建LVM分区,会报错,因此,可以先清除掉这块硬盘的分区这里本身已经分了区,如果要使用这块硬盘进行L…

    2022年6月20日
    30
  • Pycharm激活码_pycharm激活码2021

    Pycharm激活码_pycharm激活码2021激活成功教程激活法关于激活成功教程激活,很多时候输入注册码就显示过期了,很多原因是没有修改host,很简单并且只需要几分钟。方法如下:1、将“0.0.0.0account.jetbrains.com”中的内容添加到hosts文件中,hosts路径为:C:\Windows\System32\drivers\etc请注意:不需要加#2、打开http://idea.lanyus.com/,点击激…

    2022年8月27日
    11

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号