I have been generating change logs in subversion using the svn log
command. To make it easier to read, I'd like to add a newline after each revision's comments. If the output initially appears like this:
------------------------------------------------------------------------
Revision 1
------------------------------------------------------------------------
Revision 2
------------------------------------------------------------------------
I would like it to appear like this instead:
------------------------------------------------------------------------
Revision 1
------------------------------------------------------------------------
Revision 2
------------------------------------------------------------------------
I tried using the following command in batch:
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
)
This seemed to work initially, but since not every one of the revisions was made to the branch I am working on, it ended up printing extra newlines in some parts of the text file. Does anyone know how I might avoid this problem?
To find information about the history of a file or directory, use the svn log command. svn log will provide you with a record of who made changes to a file or directory, at what revision it changed, the time and date of that revision, and, if it was provided, the log message that accompanied the commit.
By default going to be in /var/log/httpd .
You can use --xml
option with the svn log
command-line. Parsing xml'ed output will allow you to format it in any way you want.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With