svn update -r m path 代码还原到某个版本(这样之前的log日志也就没了,也就是清空log日志)

时间:2021-08-03 14:49:53
[root@ok 资料库]# svn log 简历
------------------------------------------------------------------------
r174 | svnroot | -- :: + (Fri, Aug ) | line +12k
------------------------------------------------------------------------
r141 | svnroot | -- :: + (Sat, Aug ) | line 增加新的项目
------------------------------------------------------------------------
r140 | svnroot | -- :: + (Sat, Aug ) | line 增加换行
------------------------------------------------------------------------
r139 | svnroot | -- :: + (Sat, Aug ) | line 增加换行
------------------------------------------------------------------------
r138 | svnroot | -- :: + (Sat, Aug ) | line 删除最后一行
------------------------------------------------------------------------
r137 | svnroot | -- :: + (Sat, Aug ) | line xg
------------------------------------------------------------------------
r136 | svnroot | -- :: + (Sat, Aug ) | line xg
------------------------------------------------------------------------
r135 | svnroot | -- :: + (Sat, Aug ) | line 修改简历
------------------------------------------------------------------------
r134 | svnroot | -- :: + (Sat, Aug ) | line ------------------------------------------------------------------------
[root@ok 资料库]# cat 简历|head -n
陈林 12k
[root@ok 资料库]# svn update -r  简历
U 简历
Updated to revision .
[root@ok 资料库]# cat 简历|head -n
陈林
[root@ok 资料库]#

回滚后之前的版本消失了

[root@ok 资料库]# svn log 简历
------------------------------------------------------------------------
r141 | svnroot | -- :: + (Sat, Aug ) | line 增加新的项目
------------------------------------------------------------------------
r140 | svnroot | -- :: + (Sat, Aug ) | line 增加换行
------------------------------------------------------------------------
r139 | svnroot | -- :: + (Sat, Aug ) | line 增加换行
------------------------------------------------------------------------
r138 | svnroot | -- :: + (Sat, Aug ) | line 删除最后一行
------------------------------------------------------------------------
r137 | svnroot | -- :: + (Sat, Aug ) | line xg
------------------------------------------------------------------------
r136 | svnroot | -- :: + (Sat, Aug ) | line xg
------------------------------------------------------------------------
r135 | svnroot | -- :: + (Sat, Aug ) | line 修改简历
------------------------------------------------------------------------
r134 | svnroot | -- :: + (Sat, Aug ) | line ------------------------------------------------------------------------

这样也可以清理log日志,只要还原到r0就可以清之前的所有版本和日志

[root@ok app01]# svn update -r  ../app01
[root@ok app01]# svn log
------------------------------------------------------------------------
#日志被清空