On Thu, Aug 13, 2009 at 14:03, Jerry Seutter <jseutter@gmail.com> wrote:

On Thu, Aug 13, 2009 at 1:44 PM, Brett Cannon <brett@python.org> wrote:
I am trying to backport something to 2.6 and I am getting the following error from svnmerge.py:

> svnmerge.py merge -r74429t
property 'svnmerge-integrated' deleted from '.'.

property 'svnmerge-blocked' deleted from '.'.

--- Merging r74429 into '.':
C    Misc/NEWS
U    Misc/ACKS
U    Lib/test/test_pyexpat.py
U    Modules/expat/xmltok_impl.c
Summary of conflicts:
  Text conflicts: 1

property 'svnmerge-integrated' set on '.'

property 'svnmerge-blocked' set on '.'

Traceback (most recent call last):
  File "/Users/brett/.slash/python/svnmerge/svnmerge.py", line 2361, in <module>
  File "/Users/brett/.slash/python/svnmerge/svnmerge.py", line 2356, in main
    cmd(branch_dir, branch_props)
  File "/Users/brett/.slash/python/svnmerge/svnmerge.py", line 1810, in __call__
    return self.func(*args, **kwargs)
  File "/Users/brett/.slash/python/svnmerge/svnmerge.py", line 1560, in action_merge
    print >>f, construct_merged_log_message(opts["source-url"], revs),
  File "/Users/brett/.slash/python/svnmerge/svnmerge.py", line 1136, in construct_merged_log_message
    message = get_commit_log(url, r)
  File "/Users/brett/.slash/python/svnmerge/svnmerge.py", line 1122, in get_commit_log
    return recode_stdout_to_file("".join(out[1:]))
  File "/Users/brett/.slash/python/svnmerge/svnmerge.py", line 229, in recode_stdout_to_file
    return u.encode(locale.getdefaultlocale()[1])
  File "/Users/brett/.slash/python/lib/python2.6/encodings/mac_roman.py", line 12, in encode
    return codecs.charmap_encode(input,errors,encoding_table)
UnicodeEncodeError: 'charmap' codec can't encode character u'\u0107' in position 191: character maps to <undefined>

Anyone else running into this? I tried backing up svnmerge.py to r36767 (sometime in March; random choice) and I am still having the problem.


There's an accented c (ć, unicode 0x0107) in a log message.

Yeah, Ivan's last name.
  It looks like svn log is outputting the character and python can't handle it.  Wierd, since svn log is supposed to convert its output to the local encoding, just like svnmerge is trying to do.


Someone isn't using the right encoding, or else svn log has a bug.  I might just be restating the obvious.

Huh. Probably Vim putting it into some encoding like UTF-8 or Latin-1 and svn not caring until later. Guess that means I will never be able to merge/block this checkin as svnmerge will always grab that log message. So if someone else can do the block for me that would be nice (or not worry about it since we seem to never do blind merges anymore).