In writing a pre-commit hook for subversion, I am in a situation where my call to svnlook
as
MESSAGE=`svnlook cat -t $TXN $REPOS $FILE`
results in a returned value which consists of a single, continuous line instead of the properly formatted file(s) that changed in the attempted commit. This is problematic because the formatting of the source is important for compilation. Any idea why it's all ending up on a single line? Am I missing something?
The formatting is still there, but disappears when you try to use
$MESSAGE
unquoted. The shell converts all sequences of white space to a single space unless it is protected by quotes. To give an example: