Chinaunix首页 | 论坛 | 博客
  • 博客访问: 631947
  • 博文数量: 263
  • 博客积分: 6000
  • 博客等级: 准将
  • 技术积分: 2555
  • 用 户 组: 普通用户
  • 注册时间: 2008-02-26 11:20
文章分类

全部博文(263)

文章存档

2011年(10)

2010年(19)

2009年(170)

2008年(64)

我的朋友

分类: 项目管理

2009-04-28 11:20:52

名称

svn checkout — 从版本库取出一个工作拷贝。

概要

svn checkout URL[@REV]... [PATH]

描述

Check out a working copy from a repository. 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 subdirectory of PATH, with the name of the subdirectory being the basename of the URL.

Alternate Name

co

改变

创建一个工作拷贝。

是否访问版本库

选项

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

例子

取出一个工作拷贝到mine目录:

$ svn checkout file:///var/svn/repos/test mine
A mine/a
A mine/b
A mine/c
A mine/d
Checked out revision 20.
$ ls
mine

检出两个目录到两个单独的工作拷贝:

$ svn checkout file:///var/svn/repos/test  file:///var/svn/repos/quiz
A test/a
A test/b
A test/c
A test/d
Checked out revision 20.
A quiz/l
A quiz/m
Checked out revision 13.
$ ls
quiz test

检出两个目录到两个单独的工作拷贝,但是将两个目录都放到working-copies

$ svn checkout file:///var/svn/repos/test  file:///var/svn/repos/quiz working-copies
A working-copies/test/a
A working-copies/test/b
A working-copies/test/c
A working-copies/test/d
Checked out revision 20.
A working-copies/quiz/l
A working-copies/quiz/m
Checked out revision 13.
$ ls
working-copies

If you interrupt a checkout (or something else interrupts your checkout, such as loss of connectivity, etc.), you can restart it either by issuing the identical checkout command again or by updating the incomplete working copy:

$ svn checkout file:///var/svn/repos/test mine
A mine/a
A mine/b
^C
svn: The operation was interrupted
svn: caught SIGINT

$ svn checkout file:///var/svn/repos/test mine
A mine/c
^C
svn: The operation was interrupted
svn: caught SIGINT

$ svn update mine
A mine/d
Updated to revision 20.

If you wish to check out some revision other than the most recent one, you can do so by providing the --revision (-r) option to the svn checkout command:

$ svn checkout -r 2 file:///var/svn/repos/test mine
A mine/a
Checked out revision 2.
阅读(4629) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~