[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Corrupt log message in repository

From: Ben Reser <ben_at_reser.org>
Date: 2004-02-29 10:32:28 CET

On Sun, Feb 29, 2004 at 12:44:52AM -0800, Garrick Olson wrote:
> I was able to reproduce the problem with TortoiseSVN 0.26.
>
> Here is a recipe (Using Cygwin on XP SP1):
>
> $ echo "abc" > msg
> $ cat -A msg
> abc^M$
> $ echo "def" | dos2unix >> msg
> $ cat -A msg
> abc^M$
> def$
> $ svn commit -F msg
> svn: Commit failed (details follow):
> svn: Inconsistent line-endings in source stream
>
> All looks good so far. Now if I:
>
> - Open msg in Notepad
> - Select all
> - Copy
> - Go to the Windows Explorer
> - Right click and do TortoiseSVN commit
> - Paste the commit message
> - Hit okay
>
> It commits with no error, and the corrupt message gets into the
> repository.
>
> Here is the contents of the TortoiseSVN about box:
>
> TortoiseSVN 0.26.0, Build 665, UNICODE
> Subversion 0.37.0, dev build
> apr 0.9.5
> apr-iconv 0.9.5
> apr-utils 0.9.5
> berkeley db 4.2.52
> neon 0.24
> OpenSSL 0.9.7b 10 Apr 2003
> zlib 1.1.4

Okay that's what I was thinking this might be. This is a TortoiseSVN
bug. Per our documentation the log message must be UTF-8 with LF line
endings:

http://svn.collab.net/svn-doxygen/svn__client_8h.html#a10

TortoiseSVN should either convert to the proper format or error out.
They can handle that by using svn_subst_translate_string() like the
command line client does in svn_cl__get_log_message():
http://svn.collab.net/repos/svn/trunk/subversion/clients/cmdline/util.c

-- 
Ben Reser <ben@reser.org>
http://ben.reser.org
"Conscience is the inner voice which warns us somebody may be looking."
- H.L. Mencken
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Feb 29 10:31:37 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.