bug when trying to block/merge revision w/ encoded text that the terminal's locale cannot support

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

bug when trying to block/merge revision w/ encoded text that the terminal's locale cannot support

Brett Cannon-2
I was trying to do an ``svnmerg.py merge -rXXX`` the other day but
svnmerge.py kept erroring out when it was finishing up and doing its
last svnmerge-blocked setting (error is at the end of this email).
Turns out that the log message had a character encoded in UTF-8 while
svnmerge was trying to use the mac-roman encoding (probably because
that's what locale.gerpreferredencoding() returns). A potential fix
was suggested by one of the Python developers at
http://mail.python.org/pipermail/python-committers/2009-August/000608.html
in order to avoid encoding differences.

-Brett

> 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>
   main(sys.argv[1:])
 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>
_______________________________________________
Svnmerge mailing list
[hidden email]
http://www.orcaware.com/mailman/listinfo/svnmerge
Reply | Threaded
Open this post in threaded view
|

Re: bug when trying to block/merge revision w/ encoded text that the terminal's locale cannot support

Dustin J. Mitchell-3
On Sat, Aug 15, 2009 at 7:01 PM, Brett Cannon<[hidden email]> wrote:
> A potential fix
> was suggested by one of the Python developers at
> http://mail.python.org/pipermail/python-committers/2009-August/000608.html
> in order to avoid encoding differences.

Patches would be welcome.  Sadly, svn-1.5 and higher have made
svnmerge.py somewhat irrelevant, so it's not particularly likely
you'll see this implemented otherwise.  The change suggested is
non-trivial, but certainly not impossible (in fact, svnmerge.py uses
the --xml option in many places already).

Dustin

--
Open Source Storage Engineer
http://www.zmanda.com
_______________________________________________
Svnmerge mailing list
[hidden email]
http://www.orcaware.com/mailman/listinfo/svnmerge
Reply | Threaded
Open this post in threaded view
|

Re: bug when trying to block/merge revision w/ encoded text that the terminal's locale cannot support

Brett Cannon-2
On Sat, Aug 15, 2009 at 19:19, Dustin J. Mitchell<[hidden email]> wrote:
> On Sat, Aug 15, 2009 at 7:01 PM, Brett Cannon<[hidden email]> wrote:
>> A potential fix
>> was suggested by one of the Python developers at
>> http://mail.python.org/pipermail/python-committers/2009-August/000608.html
>> in order to avoid encoding differences.
>
> Patches would be welcome.

=)

>  Sadly, svn-1.5 and higher have made
> svnmerge.py somewhat irrelevant, so it's not particularly likely
> you'll see this implemented otherwise.  The change suggested is
> non-trivial, but certainly not impossible (in fact, svnmerge.py uses
> the --xml option in many places already).

OK, I just wanted to make sure people were aware.

-Brett
_______________________________________________
Svnmerge mailing list
[hidden email]
http://www.orcaware.com/mailman/listinfo/svnmerge
Reply | Threaded
Open this post in threaded view
|

Re: bug when trying to block/merge revision w/ encoded text that the terminal's locale cannot support

Jon Schewe
In reply to this post by Dustin J. Mitchell-3
Dustin J. Mitchell wrote:

> On Sat, Aug 15, 2009 at 7:01 PM, Brett Cannon<[hidden email]> wrote:
>  
>> A potential fix
>> was suggested by one of the Python developers at
>> http://mail.python.org/pipermail/python-committers/2009-August/000608.html
>> in order to avoid encoding differences.
>>    
>
> Patches would be welcome.  Sadly, svn-1.5 and higher have made
> svnmerge.py somewhat irrelevant, so it's not particularly likely
> you'll see this implemented otherwise.
I'm sad to hear that people feel that way. The primary way that I use
svnmerge.py is to do developer branches. This is still not supported by
svn-1.5 and higher. So I see a real need for svnmerge.py.

--
Jon Schewe | http://mtu.net/~jpschewe
If you see an attachment named signature.asc, this is my digital
signature. See http://www.gnupg.org for more information.

For I am convinced that neither death nor life, neither angels nor
demons, neither the present nor the future, nor any powers,
neither height nor depth, nor anything else in all creation, will
be able to separate us from the love of God that is in Christ
Jesus our Lord. - Romans 8:38-39

_______________________________________________
Svnmerge mailing list
[hidden email]
http://www.orcaware.com/mailman/listinfo/svnmerge
Reply | Threaded
Open this post in threaded view
|

Re: bug when trying to block/merge revision w/ encoded text that the terminal's locale cannot support

Blair Zajac

On Aug 15, 2009, at 8:22 PM, Jon Schewe wrote:

> Dustin J. Mitchell wrote:
>> On Sat, Aug 15, 2009 at 7:01 PM, Brett Cannon<[hidden email]>  
>> wrote:
>>
>>> A potential fix
>>> was suggested by one of the Python developers at
>>> http://mail.python.org/pipermail/python-committers/2009-August/000608.html
>>> in order to avoid encoding differences.
>>>
>>
>> Patches would be welcome.  Sadly, svn-1.5 and higher have made
>> svnmerge.py somewhat irrelevant, so it's not particularly likely
>> you'll see this implemented otherwise.
> I'm sad to hear that people feel that way. The primary way that I use
> svnmerge.py is to do developer branches. This is still not supported  
> by
> svn-1.5 and higher. So I see a real need for svnmerge.py.

Do you just mean the fact that you need to delete and recopy the  
branch after you do a --reintegrate merge?

Regards,
Blair

_______________________________________________
Svnmerge mailing list
[hidden email]
http://www.orcaware.com/mailman/listinfo/svnmerge
Reply | Threaded
Open this post in threaded view
|

Re: bug when trying to block/merge revision w/ encoded text that the terminal's locale cannot support

Jon Schewe
Blair Zajac wrote:

>
> On Aug 15, 2009, at 8:22 PM, Jon Schewe wrote:
>
>> Dustin J. Mitchell wrote:
>>> On Sat, Aug 15, 2009 at 7:01 PM, Brett Cannon<[hidden email]> wrote:
>>>
>>>> A potential fix
>>>> was suggested by one of the Python developers at
>>>> http://mail.python.org/pipermail/python-committers/2009-August/000608.html
>>>>
>>>> in order to avoid encoding differences.
>>>>
>>>
>>> Patches would be welcome.  Sadly, svn-1.5 and higher have made
>>> svnmerge.py somewhat irrelevant, so it's not particularly likely
>>> you'll see this implemented otherwise.
>> I'm sad to hear that people feel that way. The primary way that I use
>> svnmerge.py is to do developer branches. This is still not supported by
>> svn-1.5 and higher. So I see a real need for svnmerge.py.
>
> Do you just mean the fact that you need to delete and recopy the
> branch after you do a --reintegrate merge?
Yes, plus I need to delete my working directory and wait for everything
to download again, which is a real pain and highly confusing for many
developers.

--
Jon Schewe | http://mtu.net/~jpschewe
If you see an attachment named signature.asc, this is my digital
signature. See http://www.gnupg.org for more information.

For I am convinced that neither death nor life, neither angels nor
demons, neither the present nor the future, nor any powers,
neither height nor depth, nor anything else in all creation, will
be able to separate us from the love of God that is in Christ
Jesus our Lord. - Romans 8:38-39

_______________________________________________
Svnmerge mailing list
[hidden email]
http://www.orcaware.com/mailman/listinfo/svnmerge