[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How set how encode commit log message from *VC log* to svn executable?

From: Oleksandr Gavenko
Subject: How set how encode commit log message from *VC log* to svn executable?
Date: Wed, 16 Jun 2010 00:27:20 +0300
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20091204 Thunderbird/3.0

I have set 'LANG=ru_RU.cp1251' for Cygwin.
So 'svn log' command output has cp1251 encoding.

To proper view output from 'C-x v l' (vc-print-log)
I use

  (modify-coding-system-alist 'process "svn" '(cp1251 . cp1251))

But when I wrote commit message into
*VC log* and press 'C-c C-c':

 * emacs convert *VC log* buffer content to UTF-8
 * emacs invoke svn with options -m and commint message
 * svn from Cygwin read LANG env var and recode commit message
   in !!UTF-8!! by formula cp1251 ==> UTF-8.

So svn repo now store damaged commit message
(UTF-8 data wrongly recoded as cp1251 to UTF-8).

Settings (cp1251 . cp1251) for svn process have effect
on read from svn, but not on creating switches for svn.

How can I explicitly set which conversion must have place
for *VC log* commit message?

If this true for all VC back end that *VC log* converted to UTF-8?

To debug such VC behavior I wrote wrapper around svn:

  $ cat mysvn
echo "$@" >>~/usr/bin/mysvn.log
svn "$@"

and define (for Emacs 23.2.1)

  (setq vc-svn-program "mysvn")

Under ~/usr/bin/mysvn.log I found commit message in UTF-8.

Currently I found solution for svn:

  (setq vc-svn-checkin-switches '("--encoding" "utf-8"))

but it seems for me not so generic as if I can
set encoding schema for *VC log*.

Also I think that same problem expected from uses of other VCS.

Best regards!

reply via email to

[Prev in Thread] Current Thread [Next in Thread]