问题
I have this problem when I do
svn ci -m "Message text multiline" dir/
I want the log message to look like:
fixed:
-bug 1
-bug 2
-bug 3
Instead I get:
fixed: -bug 1-bug 2- bug 3
This is caused because I can't insert a newline (\n\r) in the log message.
I use putty for the SVN. I searched a little bit and I saw that for the echo command there is a solution:
echo -e "new\n\rline"
will output:
new
line
Also I saw there is a way instead of -m "message"
to specify a text.txt file where I can put the log already formatted, but I didn't find an example.
Can somebody help me fix this issue, please?
回答1:
Use the -F option to specify the log message file instead of -m
:
svn ci -F logmessage.txt dir/
See another example of using it in the documentation.
回答2:
I found out that you can add new line even with svn ci -m, it will work only if you wrote down only one coma : [good] - svn ci -m "press enter then close coma.
[bad] - svn ci -m "" dir/ (and then add the text with new lines)
来源:https://stackoverflow.com/questions/26846207/svn-ci-multiline-message-log-text-file-with-log-message