svn update -r m path 代码还原到某个版本(这样之前的log日志也就没了,也就是清空log日志)
[root@ok 资料库]# svn log 简历 ------------------------------------------------------------------------ r174 | svnroot | 2016-08-26 08:52:06 +0800 (Fri, 26 Aug 2016) | 1 line +12k ------------------------------------------------------------------------ r141 | svnroot | 2016-08-06 12:28:21 +0800 (Sat, 06 Aug 2016) | 1 line 增加新的项目 ------------------------------------------------------------------------ r140 | svnroot | 2016-08-06 12:18:18 +0800 (Sat, 06 Aug 2016) | 1 line 增加换行 ------------------------------------------------------------------------ r139 | svnroot | 2016-08-06 12:15:35 +0800 (Sat, 06 Aug 2016) | 1 line 增加换行 ------------------------------------------------------------------------ r138 | svnroot | 2016-08-06 11:01:06 +0800 (Sat, 06 Aug 2016) | 1 line 删除最后一行 ------------------------------------------------------------------------ r137 | svnroot | 2016-08-06 10:43:24 +0800 (Sat, 06 Aug 2016) | 1 line xg ------------------------------------------------------------------------ r136 | svnroot | 2016-08-06 10:42:24 +0800 (Sat, 06 Aug 2016) | 1 line xg ------------------------------------------------------------------------ r135 | svnroot | 2016-08-06 10:37:44 +0800 (Sat, 06 Aug 2016) | 1 line 修改简历 ------------------------------------------------------------------------ r134 | svnroot | 2016-08-06 10:33:14 +0800 (Sat, 06 Aug 2016) | 1 line ------------------------------------------------------------------------
[root@ok 资料库]# cat 简历|head -n 1 陈林 12k
[root@ok 资料库]# svn update -r 141 简历 U 简历 Updated to revision 141. [root@ok 资料库]# cat 简历|head -n 1 陈林 [root@ok 资料库]#
回滚后之前的版本消失了
[root@ok 资料库]# svn log 简历 ------------------------------------------------------------------------ r141 | svnroot | 2016-08-06 12:28:21 +0800 (Sat, 06 Aug 2016) | 1 line 增加新的项目 ------------------------------------------------------------------------ r140 | svnroot | 2016-08-06 12:18:18 +0800 (Sat, 06 Aug 2016) | 1 line 增加换行 ------------------------------------------------------------------------ r139 | svnroot | 2016-08-06 12:15:35 +0800 (Sat, 06 Aug 2016) | 1 line 增加换行 ------------------------------------------------------------------------ r138 | svnroot | 2016-08-06 11:01:06 +0800 (Sat, 06 Aug 2016) | 1 line 删除最后一行 ------------------------------------------------------------------------ r137 | svnroot | 2016-08-06 10:43:24 +0800 (Sat, 06 Aug 2016) | 1 line xg ------------------------------------------------------------------------ r136 | svnroot | 2016-08-06 10:42:24 +0800 (Sat, 06 Aug 2016) | 1 line xg ------------------------------------------------------------------------ r135 | svnroot | 2016-08-06 10:37:44 +0800 (Sat, 06 Aug 2016) | 1 line 修改简历 ------------------------------------------------------------------------ r134 | svnroot | 2016-08-06 10:33:14 +0800 (Sat, 06 Aug 2016) | 1 line ------------------------------------------------------------------------
这样也可以清理log日志,只要还原到r0就可以清之前的所有版本和日志
[root@ok app01]# svn update -r 0 ../app01 [root@ok app01]# svn log ------------------------------------------------------------------------ #日志被清空
联系方式QQ:326528263 EMAIL:clnking@163.com 网名:bass 分享技术 突破难点 创新思维