名称

svn move — 移动一个文件或目录。

概要

svn move SRC... DST

描述

This command moves files or directories in your working copy or in the repository.

提示

这个命令同svn copy加一个svn delete等同。

When moving multiple sources, they will be added as children of DST, which must be a directory.

注意

Subversion不支持在工作拷贝和URL之间拷贝,此外,你只可以一个版本库内移动文件—Subversion不支持跨版本库的移动。

WC → WC

移动和预订一个文件或目录将要添加(包含历史)。

URL → URL

完全服务器端的重命名。

别名

mv, rename, ren

改变

Working copy; repository if operating on a URL

是否访问版本库

只有在对URl操作时会

选项

--message (-m) TEXT
--file (-F) FILE
--revision (-r) REV (废弃的)
--quiet (-q)
--force
--parents
--with-revprop ARG
--username USER
--password PASS
--no-auth-cache
--non-interactive
--editor-cmd EDITOR
--encoding ENC
--force-log
--config-dir DIR

例子

移动工作拷bede一个文件:

$ svn move foo.c bar.c
A         bar.c
D         foo.c

Move several files in your working copy into a subdirectory:

$ svn move baz.c bat.c qux.c src
A         src/baz.c
D         baz.c
A         src/bat.c
D         bat.c
A         src/qux.c
D         qux.c

移动版本库中的一个文件(一个立即提交,所以需要提交信息):

$ svn move -m "Move a file" http://svn.red-bean.com/repos/foo.c \
                            http://svn.red-bean.com/repos/bar.c

Committed revision 27.