如何仅从 svn log 中获取带有修订、作者和评论的修改和添加的文件,详细的模式:
猫测试:
r7351 | user01 | 2013-07-02 17:53:28 -0400 (Tue, 02 Jul 2013) | 2 lines
Changed paths:
D /trunk/demo/proj1/.project
jira-125723
Removing unwanted files
------------------------------------------------------------------------
------------------------------------------------------------------------
r7352 | user02 | 2013-07-02 17:54:24 -0400 (Tue, 02 Jul 2013) | 2 lines
Changed paths:
D /trunk/demo/proj2/320-test.ert
jira-125723
Removing unwanted files
------------------------------------------------------------------------
------------------------------------------------------------------------
r7504 | user04 | 2013-07-08 14:26:36 -0400 (Mon, 08 Jul 2013) | 4 lines
Changed paths:
M /trunk/demo/maven/Sum.jsp
M /trunk/demo/Code/Results.jsp
jira-121639
WP-IQISU- lot of changes to fix issue
------------------------------------------------------------------------
------------------------------------------------------------------------
r7523 | user08 | 2013-07-08 16:17:52 -0400 (Mon, 08 Jul 2013) | 1 line
Changed paths:
A /trunk/demo/ant/properties
jira-2185[/CODE]
My code and output:
cat test | awk '/^r[0-9]* \|/ { REVISION=$1; } / [AM]/ { print REVISION": "$0; }'
r7504: M /trunk/demo/maven/Sum.jsp
r7504: M /trunk/demo/Code/Results.jsp
r7523: A /trunk/demo/ant/properties[/CODE]
但我也需要作者和评论信息。
Desired output:
r7504: user04 jira-121639 Modified /trunk/demo/maven/Sum.jsp WP-IQISU- lot of changes to fix issue
r7504: user04 jira-121639 Modified /trunk/demo/Code/Results.jsp WP-IQISU- lot of changes to fix issue
r7523: user08 jira-2185 Added /trunk/demo/ant/properties