[[email protected] online]# svn diff -r 9:8 Index: index.html =================================================================== --- index.html (revision 9) +++ index.html (revision 8) @@ -10,4 +10,3 @@ kkkkkkkkkkk kkkkkkkk ggggggg -10 [[email protected] online]# svn merge -r 9:8 "" --- Reverse-merging r9 into ‘.‘: U index.html [[email protected] online]# cat index.html <<<<<<< .mine kkkkk 2222 kkkkkllll ======= 999999 8888888 9999999999999 >>>>>>> .r5 kkkkkkkkkkk kkkkkkkk ggggggg [[email protected] online]# svn diff “” Index: index.html =================================================================== --- index.html (revision 9) +++ index.html (working copy) @@ -10,4 +10,3 @@ kkkkkkkkkkk kkkkkkkk ggggggg -10 [[email protected] online]# svn commit -m "sss" Sending index.html Transmitting file data . Committed revision 10. [[email protected] online]# svn log index.html ------------------------------------------------------------------------ r10 | user001 | 2016-05-10 03:02:21 +0800 (Tue, 10 May 2016) | 1 line sss ------------------------------------------------------------------------ r9 | user001 | 2016-05-10 02:20:13 +0800 (Tue, 10 May 2016) | 1 line ------------------------------------------------------------------------ r8 | user001 | 2016-05-10 02:13:37 +0800 (Tue, 10 May 2016) | 1 line ------------------------------------------------------------------------ r7 | user001 | 2016-05-10 01:54:53 +0800 (Tue, 10 May 2016) | 1 line ------------------------------------------------------------------------ r6 | user001 | 2016-05-10 01:53:49 +0800 (Tue, 10 May 2016) | 1 line ------------------------------------------------------------------------ r4 | user001 | 2016-05-10 01:27:00 +0800 (Tue, 10 May 2016) | 1 line ------------------------------------------------------------------------ r3 | user001 | 2016-05-10 01:21:36 +0800 (Tue, 10 May 2016) | 1 line ------------------------------------------------------------------------ r2 | user001 | 2016-05-09 19:48:15 +0800 (Mon, 09 May 2016) | 1 line add test file for mytest ------------------------------------------------------------------------ r1 | user001 | 2016-05-09 13:19:28 +0800 (Mon, 09 May 2016) | 1 line ------------------------------------------------------------------------ [[email protected] online]#
svn log -v 显示所有日志 并带修改的文件名 svn log -r ver1:ver2 显示2个版本之间的改动 svn diff -r ver1:ver2 版本回滚 综上,最必要的就是3个步骤: 1. 确定版本号 svn log <file> 2. 合并 svn merge -r <latest revision>:<last revision> <file> 3. commit. svn ci -m ‘rollback to last revision:‘ <file>
时间: 2024-09-29 02:57:14