svn update — 更新你的工作拷贝。
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.
For each updated item, it prints a line that starts with a character reporting the action taken. These characters have the following meaning:
添加
删除
更新
Conflicted
合并
第一列的字符反映文件本身的更新,而第二列会反映文件属性的更新。
--revision (-r) REV --non-recursive (-N) --quiet (-q) --no-ignore --incremental --diff3-cmd CMD --username USER --password PASS --no-auth-cache --non-interactive --config-dir DIR --ignore-externals
获取你上次更新之后版本库的修改:
$ svn update A newdir/toggle.c A newdir/disclose.c A newdir/launch.c D newdir/README Updated to revision 32.
You can also “update” your working copy to an older revision (Subversion doesn't have the concept of “sticky” files like CVS does; see 附录 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.
If you want to examine an older revision of a single file, you may want to use svn cat instead—it won't change your working copy.