I just wonna know if the output of the command svn log -v is always the same. For me it looks like:
------------------------------------------------------------------------
r2 | username | 2011-01-16 16:52:23 +0100 (Sun, 16 Jan 2011) | 1 line
Changed paths:
D /foo
Removed foo
------------------------------------------------------------------------
r1 | balzarot | 2011-01-16 16:51:03 +0100 (Sun, 16 Jan 2011) | 1 line
Changed paths:
A /foo
created foo
----开发者_StackOverflow社区--------------------------------------------------------------------
but I don't know if it is always like that, especially the format of the date! Can you help me please thnx
If you're programmatically parsing the output of svn
commands, you'll probably want to use the --xml
switch:
svn log --xml
When using this format, the date (in particular) is in standard ISO 8601 format:
<date>2010-12-06T20:58:35.698893Z</date>
IIRC, one of the goals of the text output from the SVN command line tools was that they be regular and machine parsable in addition to being human readable. I just took a quick peek at the latest docs, and the format looks identical to what I remember reading about several years ago
精彩评论