Chinaunix首页 | 论坛 | 博客
  • 博客访问: 498979
  • 博文数量: 104
  • 博客积分: 3045
  • 博客等级: 少校
  • 技术积分: 1230
  • 用 户 组: 普通用户
  • 注册时间: 2008-02-29 10:18
文章分类

全部博文(104)

文章存档

2011年(72)

2010年(1)

2009年(1)

2008年(30)

分类: 项目管理

2011-05-26 15:11:52

Svn changelist是一个对本地副本库修改的文件进行分组的命令, 可以将修改的文件分组,按照分组单独提交。 方法如下
查看两个编辑的文件
$ svn status
M integer.c
M mathops.c
将这两个编辑文件加入到math-fixes中去
$ svn changelist math-fixes integer.c mathops.c
Path 'integer.c' is now a member of changelist 'math-fixes'.
Path 'mathops.c' is now a member of changelist 'math-fixes'.
$ svn status
--- Changelist 'math-fixes':
M integer.c
M mathops.c
删除 button.c 在分组中
$ svn changelist --remove button.c
Path 'button.c' is no longer a member of a changelist.
$ svn changelist ui-fix button.c
Path 'button.c' is now a member of changelist 'ui-fix'.
再将button.c加入到ui-fix分组中去
$ svn changelist ui-fix button.c
svn: warning: Removing 'button.c' from changelist 'math-fixes'.
Path 'button.c' is now a member of changelist 'ui-fix'.
$ svn status
--- Changelist 'ui-fix':
button.c
--- Changelist 'math-fixes':
M integer.c
M
$ svn status
--- Changelist 'ui-fix':
M button.c
--- Changelist 'math-fixes':
M integer.c
M mathops.c
比较修改
$ svn diff --changelist math-fixes
Index: integer.c
===================================================================
--- integer.c (revision 1157)
+++ integer.c (working copy)
Index: mathops.c
===================================================================
--- mathops.c (revision 1157)
+++ mathops.c (working copy)
分组提交
$ svn ci -m "Fix a UI bug found while working on math logic." \
--changelist ui-fix
Sending button.c
Transmitting file data .
Committed revision 1158.
其实可以在提交分组的时候保留分组,默认的要删除分组的。
In fact, the svn commit command provides a second changelists-related option: -
-keep-changelists. Normally, changelist assignments are removed from files after they
are committed. But if --keep-changelists is provided, Subversion will leave the
changelist assignment on the committed (and now unmodified) files. In any case, committing
files assigned to one changelist leaves other changelists undisturbed.
阅读(2205) | 评论(0) | 转发(0) |
0

上一篇:Linux cut命令

下一篇:安装g++ 及 svn add .so

给主人留下些什么吧!~~