RockPaperScissors

LizardSpock

SVN Multi-line Comments on the Command Line

| Comments

Answer:

svn commit -m $'Line 1 \nLine 2'

The Problem

Committing to subversion on the command line and using escaped line returns for multi line comments:

svn commit -m $'Line 1 \nLine 2'

svn log will show some thing like

------------------------------------------------------------------------
r1 | user | 2012-03-28 13:37:48 +0100 (Wed, 28 Mar 2012) | 1 lines

Line 1 \nLine 2

Answer originally posted on ServerFault. Strings contained in \‘\’ should not be interpreted by the command line but:

svn commit -m "Line 1 \nLine 2"

Shows the same errors. Starting the comment with a $ does seem to fix it.

svn commit -m $'Line 1 \nLine 2'

Will give:

------------------------------------------------------------------------
r1 | user | 2012-03-28 13:37:48 +0100 (Wed, 28 Mar 2012) | 1 lines

Line 1 
Line 2

Comments