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

Prevent mod_dav_svn REPORT log failure if files under $REPOS/db/revprops/ are not in UTF-8 encoding

From: LiuYan 刘研 <lovetide_at_21cn.com>
Date: Wed, 17 Nov 2010 15:06:19 +0000 (UTC)

Stefan Sperling <stsp <at> elego.de> writes:

>
> On Wed, Nov 17, 2010 at 11:48:07AM +0000, LiuYan 刘研 wrote:
> > I converted CVSNT respositoy to SVN repository some days ago, and config
> > mod_dav_svn in Apache http.conf.
> >
> >
> > When I try 'svn log http://192.168.105.4:8000/svn/cmcc', it shown some logs
but
> > failed/terminated at some revisions with a message like:
> > svn: REPORT of '/svn/cmcc/!svn/bc/1': 200 OK (http://192.168.105.4:8000)
> >
> >
> > I try to the svn:// protocol to get log of the failed revisions, it can get
the
> > log, but the log is not human-readable like the following:
> > svn log svn://192.168.105.4 -r 1
> > ------------------------------------------------------------------------
> > r1 | (no author) | 2005-11-10 17:28:50 +0800 (星期四, 10 十一月 2005) | 2
lines
> >
> > Standard project directories initialized by cvs2svn.?\211?\201 cvs2svn
> > ?\179?\245?\202?\188?\187?\175?\181?\196?\177?\234?\215?\188?\207?\238?\196?
> > \191?\206?\196?\188?\254?\188?\208
> > ------------------------------------------------------------------------
> >
> >
> > It seems a charset encoding problem of 'revprops' files because I
> > set 'ctx.initial_project_commit_message' cvs2svn options config file to a
> > string contains Chinese characters, and cvs2svn options config file itself
is
> > encode in GBK, and it seems cvs2svn does not converted the charset encoding
of
> > initial_project_commit_message to UTF-8.
> >
> >
> > Does this encoding issue can caused mod_dav_svn REPORT failed?
>
> The revprops should be encoded in UTF-8.
>
> You could write each revprop to a temporary file (get it with 'svn
> propget --revprop'), and convert that file to UTF-8 encoding.
> Then set the revprop again e.g. by using the svnadmin setrevprop command.
>
> Stefan
>
 
Thank you Stefan! And sorry for my poor English.

I've already converted these revprops files by operating them directly (I know
it's a dangerous way) via a little script, now 'svn log
http://svnserver/svnrepos/svnrepo' works fine.

My orginal idea is:
If this "svn: REPORT of " error is returned by mod_dav_svn, can it act friendly
as the same as svnserve ?
I mean, if the revprops files are not in UTF-8 encoding, don't return REPORT
Failed to client side, but still return the malformed log instead, so that the
end user can notice IT'S WRONG, and can easily figure out WHY IT'S WRONG.

Liu Yan
Received on 2010-11-17 16:07:18 CET

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

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