名称

svn update — 更新你的工作拷贝。

概要

svn update [PATH...]

描述

svn update brings changes from the repository into your working copy. If no revision is given, it brings your working copy up to date with the HEAD revision. Otherwise, it synchronizes the working copy to the revision given by the --revision option. As part of the synchronization, svn update also removes any stale locks (see “有时你只需要清理”一节) found in the working copy.

对于每一个更新的项目开头都有一个表示所做动作的字符,这些字符有下面的意思:

A

添加

B

Broken Lock (third column only)

D

删除

U

更新

C

冲突

G

合并

E

Existed

A character in the first column signifies an update to the actual file, while updates to the file's properties are shown in the second column. Lock information is printed in the third column.

As with most subcommands, you can limit the scope of the update operation to a particular tree depth using the --depth option. Alternatively, you can use the --set-depth option to set a new “sticky” working copy depth on the update target. Currently, the depth of a working copy directory can only be increased (telescoped more deeply); you cannot make a directory more shallow.

Alternate Name

up

改变

工作拷贝2

是否访问版本库

选项

--revision (-r) REV
--depth ARG
--set-depth ARG
--force
--quiet (-q)
--no-ignore
--incremental
--diff3-cmd CMD
--editor-cmd ARG
--accept ARG
--username USER
--password PASS
--no-auth-cache
--non-interactive
--config-dir DIR
--ignore-externals
--changelist

例子

获取你上次更新之后版本库的修改:

$ svn update
A  newdir/toggle.c
A  newdir/disclose.c
A  newdir/launch.c
D  newdir/README
Updated to revision 32.

你也可以将工作拷贝更新到旧的修订版本(Subversion没有CVS的“sticky”文件的概念;见附录 B, CVS用户的Subversion指南):

$ svn update -r30
A  newdir/README
D  newdir/toggle.c
D  newdir/disclose.c
D  newdir/launch.c
U  foo.c
Updated to revision 30.

提示

如果你希望检查单个文件的旧的修订版本,你会希望使用svn cat