只需要svn log中的目录名和文件更改信息
这是我的 svn 日志
svn log -v http://test/svn/Demo/branches/HelloWorld/Batch/ --limit 2
------------------------------------------------------------------------
r133 | testuser1 | 2013-04-02 18:22:28 -0400 (Tue, 02 Apr 2013) | 3 lines
Changed paths:
M /branches/HelloWorld/Batch/test.java
DEMO-13
Testing to lock
------------------------------------------------------------------------
r132 | testuser2 | 2013-04-02 18:20:40 -0400 (Tue, 02 Apr 2013) | 3 lines
Changed paths:
M /branches/HelloWorld/Batch/test.java
DEMO-1
Testing to lock
期望的输出:
Batch/test.java
Batch/test.java
我的脚本:
svn log -v http://test/svn/Demo/branches/HelloWorld/Batch/ --limit 2 | awk '$1~/^[AMD]$/{for(i=2;i<=NF;i++)print $i}'
脚本输出:
/branches/HelloWorld/Batch/test.java
/branches/HelloWorld/Batch/test.java