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)
上一篇 2021年10月21日 下午8:00
下一篇 2021年10月21日 下午9:00


相关推荐

  • 宏与WINDOWS API简单使用

    宏与WINDOWSAPI简单使用#define定义宏定义宏语法:#define<宏名><字符串>如#definePI3.1415926#defineP

    2021年12月13日
    53
  • 公平锁与非公平锁_公平锁和非公平锁区别

    公平锁与非公平锁_公平锁和非公平锁区别公平锁和非公平锁一、如果一个锁是公平的,那么获取的顺序就应该符合请求的绝对顺序,即FIFO。二、测试结果 非公平性锁可能使线程“饥饿”,为什么它又被设定成默认的实现呢?再次观察上表的结果,如果把每次不同线程获取到锁定义为1次切换,公平性锁在测试中进行了10次切换,而非公平性锁只有5次切换,这说明非公平性锁的开销更小。三、,公平性锁保证了锁的获取按照FIFO原则,而代价是进行…

    2022年8月12日
    10
  • 蓝牙开发心得体会

    蓝牙开发心得体会一、关于布局适配建议1、不要使用绝对布局2、尽量使用match_parent而不是fill_parent。3、能够使用权重的地方尽量使用权重(android:layout_weight)4、如果是纯色背景,尽量使用android的shape自定义。5、如果需要在特定分辨率下适配,可以在res目录上新建layout-HxW.xml的文件夹。比如要适配10

    2022年6月20日
    30
  • 原生JS设置CSS样式有多少方式

    原生JS设置CSS样式有多少方式element style 和 element style cssText 有什么区别原生 JS 调整样式方式有 3 种 element style 使用驼峰形式 important 权重无效 document getElementBy box backgroundCo red important 无作用 下面两句是等效的 document getElementBy box style color red important document

    2026年3月18日
    2
  • 大型网站架构之分布式消息队列

    大型网站架构之分布式消息队列大型网站架构之分布式消息队列 nbsp 以下是消息队列以下的大纲 本文主要介绍消息队列概述 消息队列应用场景和消息中间件示例 电商 日志系统 本次分享大纲消息队列概述消息队列应用场景消息中间件示例 JMS 消息服务常用消息队列参考 推荐 资料本次分享总结一 消息队列概述消息队列中间件是分布式系统中重要的组件 主要解决应用耦合 异步消息 流量削锋等问题 实现高性能 高可用 可伸缩和最

    2026年3月20日
    1
  • 宫廷计动漫_动漫乱斗

    宫廷计动漫_动漫乱斗在移动互联网和资本的助力下,我国动漫市场近几年开始步入快速发展期。相关数据显示,我国动漫行业2017年的产值已达1536亿元人民币,占整个文娱产业总产值的24%,且预计我国动漫行业总产值在2020年将到达2212亿元。在看到动漫市场具备如此“钱景”之后,不少资本企业纷纷开始布局动漫领域,市场上出现了动漫之家、有妖气漫画、看漫画、腾讯动漫、快看漫画等平台,还有不久前B站推出的哔哩哔哩漫画APP等…

    2022年8月23日
    6

发表回复

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

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