- 1 year ago
SVN: How to list author, date and comments from svn log
To list author, date, and comments from svn log
in Subversion (SVN), you can use the --xml
option along with --verbose
to retrieve detailed information. Here's an example command to achieve this:
shellsvn log --xml --verbose
This command will output the SVN log in XML format, including author, date, and comments for each revision.
If you prefer a more structured output, you can use tools like xmllint
or xmlstarlet
to parse and extract the desired information from the XML output. For example, using xmlstarlet
, you can filter the XML output to retrieve specific fields. Here's an example command to extract author, date, and comments:
shellsvn log --xml --verbose | xmlstarlet sel -t -v "//logentry" -m "//logentry" -n -v "author" -o " | " -v "date" -o " | " -v "msg" -n
This command uses xmlstarlet
to select the logentry
elements and extract the author, date, and comments (msg
) fields. The fields are separated by "|" to provide a clear distinction.
Make sure you have xmlstarlet
installed on your system to run the above command. Adjust the command and XML filtering as per your requirements.
By utilizing the --xml
option in svn log
and XML parsing tools, you can extract the desired information such as author, date, and comments from the SVN log.