SVN hook adjustment with pre-latch

I am using a Python script to implement SVN binding before commit :

svnlookPath = 'path-to-svnlook' f = subprocess.Popen([svnlookPath, 'log', sys.argv[1], '--transaction', sys.argv[2]], stdout=subprocess.PIPE).stdout commitMessage = f.read() f.close() commitMessage = commitMessage.rstrip('\n\r') print >> sys.stderr, 'Commit message: "' + commitMessage + '"' sys.exit(1) 

My pre-commit.bat (server hosted on Windows Server 2008):

 @python.exe path-to-py-file %1 %2 

On the client side, I use TortoiseSVN .

Everything is going fine except for a commit message . If the commit message contains, for example, Russian letters, they are displayed as "?" (question marks) in the Tortoise window.

+4
source share
2 answers

I would say that it is more likely a .bat error and then a python script, because python has excellent unicode support.
Perhaps the answer to this question may help you.

Batch File Encoding

+2
source

The problem may be Turtle itself. Try the following

svn log http: // rev_url

and see what svn says is a journal comment. If this is correct, then probably the turtle will not show the Russian encoding. What happens if you lock your hook without locking? Is this displayed correctly?

0
source

All Articles