SVN子命令SVN Update详解

本文讲解一下SVN Update 问题,它是Subversion的一个命令,在这里拿出来和大家分享一下,希望对大家有用。
本节说一下Subversion的子命令SVN Update命令问题,大家应该知道Subversion是一个版本管理软件,了解了Subversion的命令就可以更好的操作 Subversion了。
名称
SVN Update命令—更新你的工作拷贝。
概要
svn update[PATH…]
SVN Update命令描述
svnupdate会把版本库的修改带到工作拷贝,如果没有给定修订版本,它会把你的工作拷贝更新到HEAD修订版本,否则,它会把工作拷贝更新到你用–revision指定的修订版本。为了保持同步,svnupdate也会删除所有在工作拷贝发现的无效锁定(见“有时你只需要清理”一节)。
对于每一个更新的项目开头都有一个表示所做动作的字符,这些字符有下面的意思:
A添加
D删除
U更新
C冲突
G合并
第一列的字符反映文件本身的更新,而第二列会反映文件属性的更新。
别名up
改变
工作拷贝2
是否访问版本库

选项
–revision(-r)REV
–non-recursive(-N)
–quiet(-q)
–no-ignore
–incremental
–diff3-cmdCMD
–usernameUSER
–passwordPASS
–no-auth-cache
–non-interactive
–config-dirDIR
–ignore-externals
例子
SVN Update命令获取你上次更新之后版本库的修改:
$svn update
Anewdir/toggle.c
Anewdir/disclose.c
Anewdir/launch.c
Dnewdir/README
Updated to revision 32.
你也可以将工作拷贝更新到旧的修订版本(Subversion没有CVS的“sticky”文件的概念;见附录B,CVS用户的Subversion指南):
$svnupdate-r30
Anewdir/README
Dnewdir/toggle.c
Dnewdir/disclose.c
Dnewdir/launch.c
Ufoo.c
Updatedtorevision30.
提示:如果你希望检查单个文件的旧的修订版本,你会希望使用svncat。SVN Update命令介绍完毕。
$ svn help update
update (up): Bring changes from the repository into the working copy.
usage: update [PATH…]
If no revision is given, bring working copy up-to-date with HEAD rev.
Else synchronize working copy to revision given by -r.
For each updated item a line will be printed with characters reporting
the action taken. These characters have the following meaning:
A Added
D Deleted
U Updated
C Conflict
G Merged
E Existed
R Replaced
Characters in the first column report about the item itself.
Characters in the second column report about properties of the item.
A ‘B’ in the third column signifies that the lock for the file has
been broken or stolen.
A ‘C’ in the fourth column indicates a tree conflict, while a ‘C’ in
the first and second columns indicate textual conflicts in files
and in property values, respectively.
If –force is used, unversioned obstructing paths in the working
copy do not automatically cause a failure if the update attempts to
add the same path. 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. Obstructing paths are reported
in the first column with code ‘E’.
If the specified update target is missing from the working copy but its
immediate parent directory is present, checkout the target into its
parent directory at the specified depth. If –parents is specified,
create any missing parent directories of the target by checking them
out, too, at depth=empty.
Use the –set-depth option to set a new working copy depth on the
targets of this operation.
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
-N [–non-recursive] : obsolete; try –depth=files or –depth=immediates
–depth ARG : limit operation by depth ARG (’empty’, ‘files’,
‘immediates’, or ‘infinity’)
–set-depth ARG : set new working copy depth to ARG (‘exclude’,
’empty’, ‘files’, ‘immediates’, or ‘infinity’)
-q [–quiet] : print nothing, or only summary information
–diff3-cmd ARG : use ARG as merge command
–force : force operation to run
–ignore-externals : ignore externals definitions
–changelist [–cl] ARG : operate only on members of changelist ARG
–editor-cmd ARG : use ARG as external editor
–accept ARG : specify automatic conflict resolution action
(‘postpone’, ‘working’, ‘base’, ‘mine-conflict’,
‘theirs-conflict’, ‘mine-full’, ‘theirs-full’,
‘edit’, ‘launch’)
(shorthand: ‘p’, ‘mc’, ‘tc’, ‘mf’, ‘tf’, ‘e’, ‘l’)
–parents : make intermediate directories
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 (default is to prompt
only if standard input is a terminal device)
–force-interactive : do interactive prompting even if standard input
is not a terminal device
–trust-server-cert : accept SSL server certificates from unknown
certificate authorities 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

此条目发表在other分类目录,贴了标签。将固定链接加入收藏夹。

发表回复

您的电子邮箱地址不会被公开。

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据