svn 打包patch commit changelist

svn diff fileURL > patchName.patch (打diff包)


Svn changelist是一个对本地副本库修改的文件进行分组的命令,他可以作为其它命令的参数,但是它仅仅是本地副本库的一个分组,不能在库中传播与其它用户分享。

C:\Documents and Settings\ >svn help changelist

changelist (cl): Associate (or dissociate) changelist CLNAME with the named file

s.

usage: 1. changelist CLNAME TARGET...

       2. changelist --remove TARGET...

 

Valid options:

  -q [--quiet]             : print nothing, or only summary information

  -R [--recursive]         : descend recursively, same as --depth=infinity

  --depth ARG              : limit operation by depth ARG ('empty', 'files',

                            'immediates', or 'infinity')

  --remove                 : remove changelist association

  --targets ARG            : pass contents of file ARG as additional args

  --changelist ARG         : operate only on members of changelist ARG

                             [aliases: --cl]

 

使用实例:

1、工作副本下

$ svn status
M      integer.c
M      mathops.c
$

2、使用svn changelist

$ 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
$

3changelist添加删除

$ 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'.
$

 

$ 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      mathops.c
$

 

4changelist作为参数

$ 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)
$
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值