command line can not use log date

19 views
Skip to first unread message

creater msc

unread,
Nov 25, 2019, 1:57:20 AM11/25/19
to TortoiseSVN
i want use command line to list all log in bewteen date  with this command:
 svn log -q -r {2019-11-24}:{2019-11-25}
but has error

SVN错误日志.png

does anyone know why?
SVN错误日志.png

David Balažic

unread,
Nov 26, 2019, 6:03:35 AM11/26/19
to TortoiseSVN
You are using PowerShell, where the {} characters have special meaning, so you must escape them. To do that, type them twice, like this:
svn log -q -r {{2019-11-24}}:{{2019-11-25}}

Or instead use the classic command line (cmd.exe) where {} works "normal".

Regards,
David

Bruce C

unread,
Nov 27, 2019, 5:41:05 AM11/27/19
to torto...@googlegroups.com
I'm not the original poster but I'm grateful for you pointing out that the problem was with the PowerShell parsing and the curly braces being treated specially. I didn't think of that, so thanks. Unfortunately, your solution didn't work for me. I'm not sure why because it seems like a valid approach.

What did work for me was quoting the revision dates, either with single or double quotes. So, the following both worked for me:
    svn log -q -r "{2019-11-24}:{2019-11-25}"

    svn log
-q -r '{2019-11-24}:{2019-11-25}'

I did also find a method of escaping the curly brackets that worked, using the backtick (`) - not to be confused with the single quote, as follows:
    svn log -q -r `{2019-11-24`}:`{2019-11-25`}

Hope this helps.
Reply all
Reply to author
Forward
0 new messages