查看两个编辑的文件
$ 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.