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)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • 如何将ofd文件转成pdf格式?

    如何将ofd文件转成pdf格式?自电子发票改为ofd格式文件后,很多通知、办公文档也逐步开始用ofd替代,但毕竟使用还不算普及,我们也都更习惯PDF格式。那么如何将OFD文件转成PDF呢?对于不熟悉和不知如何打开OFD文件的人来说,最简单的方法当然是直接转成PDF后再打开查看或修改,这里我们需要用到专门的转换工具。不需要安装软件,只需要搜索speedpdf打开这个在线工具页面就能转换,首页就能找到我们需要的OFD转PDF功能。(除此之外还有XPS和CAD这些很难找到转换工具的格式转换哦)转换过程也非常简单,添加需要转换的文档后,点击

    2022年5月27日
    41
  • vue 隐藏滚动条_vue滚动条自动滚动到底部

    vue 隐藏滚动条_vue滚动条自动滚动到底部1、设置滚动条: overflow-x:scroll;white-space:nowrap;2、隐藏滚动条:::-webkit-scrollbar{width:0!important;}::-webkit-scrollbar{width:0!important;height:0;}…

    2025年6月12日
    2
  • JAVA 大数据Excel POI生成导出

    JAVA 大数据Excel POI生成导出一、背景在工作中经常会将List导出Excel,但是有时数据量很大,需要一次性导出。为防止各个系统重复造轮子,本文通过注解方式来实现Excel的普通、分片生成。二、直接上代码1、导入依赖<dependency><groupId>org.apache.poi</groupId><artifactId>poi-ooxml</artifactId>…

    2022年10月7日
    2
  • 第十五篇 Python之文件处理

    第十五篇 Python之文件处理一文件操作计算机系统分为:计算机硬件,操作系统,应用程序三部分。我们用python或其他语言编写的应用程序若想要把数据永久保存下来,必须要保存于硬盘中,这就涉及到应用程序要操作硬件,众所周知,应

    2022年7月5日
    20
  • 八数码问题求解「建议收藏」

    八数码问题求解「建议收藏」(一)问题描述在一个3*3的方棋盘上放置着1,2,3,4,5,6,7,8八个数码,每个数码占一格,且有一个空格。这些数码可以在棋盘上移动,其移动规则是:与空格相邻的数码方格可以移入空格。现在的问题是:对于指定的初始棋局和目标棋局,给出数码的移动序列。该问题称八数码难题或者重排九宫问题。(二)问题分析八数码问题是个典型的状态图搜索问题。搜索方式有两种基本的方式,即树式搜索和线式搜索。搜索策略大体有盲…

    2022年7月26日
    5
  • 五大创意礼品网站_实用礼品

    五大创意礼品网站_实用礼品朋友、父母过生,经常苦于不知道送啥好,送一般的显得没有新意,想送个有创意的吧,又不知道到哪选。为此,小编我特意调研了国内的创意礼品网站,给出前十位的网站,供大家参考。礼意久久送礼网:www.liyi99.com  成立于09年的礼意久久送礼网是目前国内领先的在线礼品销售网站,礼品门类齐全,有自己的呼叫中心,同时也接受过央视的采访。  优点:礼品种类齐全,同时全国免运费;…

    2025年8月5日
    4

发表回复

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

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