Formatting svn log output

I create change logs for subversion using the command svn log. To simplify the reading, I would like to add a new line after each comment of the editorial staff. If the output initially looks like this:

------------------------------------------------------------------------
Revision 1
------------------------------------------------------------------------
Revision 2
------------------------------------------------------------------------

I would like it to look like this:

------------------------------------------------------------------------
Revision 1


------------------------------------------------------------------------
Revision 2


------------------------------------------------------------------------

I tried using the following command in a package:

FOR /L %%i IN (starting_revision, 1, ending_revision) DO (

svn log branch_name -r %%i --incremental >> output.txt
echo. >> output.txt
echo. >> output.txt

)

It seemed like it worked from the beginning, but since not all the changes were made to the branch I'm working on, she finished printing additional lines in some parts of the text file. Does anyone know how I could avoid this problem?

+4
source share
2 answers

--xml svn log. xml'ed- .

+3

,

svn log | perl -l40pe 's/^-+/\n/'

, .

0

Source: https://habr.com/ru/post/1544519/


All Articles