[prev in list] [next in list] [prev in thread] [next in thread] 

List:       svk-devel
Subject:    [svk-devel] Re: How to fix "Can't decode commit message as ascii" ?
From:       axel () kollmorgen ! net (Axel Kollmorgen)
Date:       2007-09-30 12:21:41
Message-ID: fdoc0n$s6m$1 () sea ! gmane ! org
[Download RAW message or body]

On 18.12.2006 23:20, Peter Murray wrote:
> On 12/15/06 10:31 AM, Peter Murray wrote:
>> I am trying to mirror a remote CVS repository using SVK and I am
>> stumbling up against a "Can't decode commit message as ascii." error.
>> I've tried svk 1.08 and the latest beta released a few days ago, and
>> both exhibit the same problem:
> 
> With a problem to solve and no quick answers from this group or through
> web search and code inspection, I ended up suppressing the problem by
> going into the code and commenting out the 'die' statement that was
> triggering the error message.  Since my goal was to mirror the
> repository into Subversion without the log messages out of the CVS
> repository, this seems to work fine for me.  At some point it would be
> nice to correct the underlying issue, though, if anyone has any suggestions.

better: in lib/SVK/Util.pm, sub from_native(), change

  my $buf = eval { $enc->decode ($_[0], 1) };

to

  my $buf = eval { $enc->decode ($_[0], 0) };

that way, you *do* get the cvs commit message into svn, with "a
substitution character in place of a malformed character" [1]. it would
even be possible to determine or guess [2] the wrong source encoding and
properly decode it to svn.

[1] http://perldoc.perl.org/Encode.html#_CHECK_-=-Encode::FB_DEFAULT-(-==-0)
[2] http://perldoc.perl.org/Encode/Guess.html

ax

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic