I would like to do
svn commit -m \"\"
But message should have two lines:
Commit by: firstuser
Bug track: 92
How about using the -F
parameter to get the log message from a file?
Then, you could do this (untested):
ECHO Commit by: firstuser>SvnLog.txt
ECHO Bug track: 9283>>SvnLog.txt
SVN COMMIT -F SvnLog.txt
You can define the newline as follows:
set newline=^& echo.
Then, you can use the newline in other statements, like this: (no quotes)
echo This is the first line%newline%This is the second line
echo "This is the first line"%newline%"This is the second line"
or with an extra caret, like this:
set text=This is the first line^%newline%This is the second line
Perhaps you can play with that, but mind the combination with quotes!
Additional example to @jeb's answer
answer:
set br= ^
<</br (newline)>>
<</br>>
example:
@echo off
setlocal enableExtensions enableDelayedExpansion
rem cd /D "%~dp0"
set br= ^
rem br, can't be saved to a var. by using %..%;
set "t=t1!br!t2!br!t3"
for /f "usebackq tokens=* delims=" %%q in ('!t!') do (
echo %%q
)
:scIn
rem endlocal
pause
rem exit /b
; output:
t1
t2
t3
Press any key to continue . . .
Write the message in text editor and just copy and paste it to terminal(command editor).
Just type message in a text editor in multiple lines.
-m "Message line
Message line 2
Message line 3"
Type the required command in command editor.
svn command
Copy and paste the message content from text editor to command editor.
svn command -m "Message line 1.
Message line 2
Message line 3"
4.Execute Enter .
5.It works :)
Just write svn ci -m "old line
press Enter then type in next line new line"
This is much easier than using file.
To create a newline in a svn message the best way is the one of aphoria with an extra message-file.
But it can be done also with the -m
Sample with a batch file
@echo off
SETLOCAL ENABLEDELAYEDEXPANSION
set lf=^
rem ** Two empty lines are neccessary for creating the Linefeed
svn commit -m "A!lf!Message!lf!with!LF!newline"
You could also use it on the command line
svn commit -m ^"This is a^
MORE?
MORE?my newline"