svn status — 打印工作拷贝文件和目录的状态。
Print the status of working copy files and
directories. With no arguments, it prints only locally
modified items (no repository access). With
--show-updates, it adds working revision
and server out-of-date information. With
--verbose, it prints full revision
information on every item. With --quiet,
it prints only summary information about locally modified
items.
输出的前六列都是一个字符宽,每一列给出了工作拷贝项目的每一方面的信息。
第一列指出一个项目的是添加、删除还是其它的修改。
没有修改。
预定要添加的项目。
预定要删除的项目。
项目已经修改了。
项目在工作拷贝中已经被替换了。这意味着文件预定要删除,然后有一个同样名称的文件要在同一个位置替换它。
项目的内容(相对于属性)与更新得到的数据冲突了。
Item is present because of an externals definition.
Item is being ignored (e.g. with the
svn:ignore property).
项目不在版本控制之下。
Item is missing (e.g. you moved or deleted it without using svn). This also indicates that a directory is incomplete (a checkout or update was interrupted).
项目作为一种对象(文件、目录或链接)纳入版本控制,但是已经被另一种对象替代。
第二列告诉一个文件或目录的属性的状态。
没有修改。
这个项目的属性已经修改。
这个项目的属性与从版本库得到的更新有冲突。
第三列只在工作拷贝锁定时才会出现。(见“有时你只需要清理”一节。)
项目没有锁定。
项目已经锁定。
第四列只在预定包含历史添加的项目出现。
没有历史预定要提交。
历史预定要伴随提交。
第五列只在项目跳转到相对于它的父目录时出现(见“使用分支”一节)。
项目是它的父目录的孩子。
项目已经转换。
第六列显示锁定信息。
当使用--show-updates,文件没有锁定。如果不使用--show-updates,这意味着文件在工作拷贝被锁定。
文件锁定在工作拷贝。
文件被另一个工作拷贝的另一个用户锁定,只有在使用--show-updates时显示。
File was locked in this working copy, but the
lock has been “stolen” and is invalid.
The file is currently locked in the repository. This
only appears when --show-updates is
used.
File was locked in this working copy, but the
lock has been “broken” and is invalid.
The file is no longer locked This only appears when
--show-updates is used.
The out-of-date information appears in the seventh
column (only if you pass the
--show-updates option).
这个项目在工作拷贝是最新的。
在服务器这个项目有了新的修订版本。
The remaining fields are variable width and
delimited by spaces. The working revision is the next
field if the --show-updates or
--verbose options are passed.
If the --verbose option is passed,
the last committed revision and last committed author
are displayed next.
工作拷贝路径永远是最后一个字段,所以它可以包括空格。
--show-updates (-u) --verbose (-v) --depth ARG --quiet (-q) --no-ignore --username USER --password PASS --no-auth-cache --non-interactive --config-dir DIR --ignore-externals --changelist ARG
这是查看你在工作拷贝所做的修改的最简单的方法。
$ svn status wc M wc/bar.c A + wc/qax.c
If you want to find out what files in your working
copy are out-of-date, pass the
--show-updates option (this will
not make any changes to your
working copy). Here you can see that
wc/foo.c has changed in the
repository since we last updated our working
copy:
$ svn status --show-updates wc
M 965 wc/bar.c
* 965 wc/foo.c
A + 965 wc/qax.c
Status against revision: 981
--show-updatesonly places an asterisk next to
items that are out of date (that is, items that will be
updated from the repository if you run svn
update). --show-updates does
not cause the status listing to
reflect the repository's version of the item (although
you can see the revision number in the repository by
passing the --verbose option).
最后,是你能从status子命令得到的所有信息:
$ svn status --show-updates --verbose wc
M 965 938 sally wc/bar.c
* 965 922 harry wc/foo.c
A + 965 687 harry wc/qax.c
965 687 harry wc/zig.c
Head revision: 981
For many more examples of svn status, see “查看你的修改概况”一节.