unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* How set how encode commit log message from *VC log* to svn executable?
@ 2010-06-15 21:27 Oleksandr Gavenko
  0 siblings, 0 replies; only message in thread
From: Oleksandr Gavenko @ 2010-06-15 21:27 UTC (permalink / raw)
  To: help-gnu-emacs

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
#!/bin/sh
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!




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-06-15 21:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-15 21:27 How set how encode commit log message from *VC log* to svn executable? Oleksandr Gavenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).