Edgewall Software
Modify

Opened 15 years ago

Closed 13 years ago

Last modified 6 years ago

#8180 closed defect (duplicate)

Bad encoding in mercurial plugin

Reported by: davojan@… Owned by: Christian Boos
Priority: high Milestone:
Component: plugin/mercurial Version: none
Severity: major Keywords: unicode
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

In browse source I got an error UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 23: ordinal not in range(128) (see attached screenshot).

I've fixed the bug by changing tracext/hg/backend.py:647:

if f.startswith(d):

to

if unicode(f, "utf-8").startswith(d):

Attachments (3)

trac-hg-bug.png (85.7 KB ) - added by davojan@… 15 years ago.
Bug illustration
tracext-hg-backend.py.diff (868 bytes ) - added by kim@… 14 years ago.
Small hack that made it work for me
tracext-hg-backend.py.latin-1.diff (2.9 KB ) - added by anonymous 14 years ago.
This one worked for me

Download all attachments as: .zip

Change History (8)

by davojan@…, 15 years ago

Attachment: trac-hg-bug.png added

Bug illustration

comment:1 by Christian Boos, 15 years ago

Keywords: unicode added
Milestone: not applicable

Thanks for the report.

For the fix, I'd rather change convert [dir,] from utf-8 to the encoding used for the repository file names (see #7799 and ticket:7160#comment:5).

by kim@…, 14 years ago

Attachment: tracext-hg-backend.py.diff added

Small hack that made it work for me

comment:2 by Christian Boos, 14 years ago

Milestone: not applicablemercurial-plugin

by anonymous, 14 years ago

This one worked for me

comment:3 by Christian Boos, 13 years ago

Resolution: duplicate
Status: newclosed

See rather #8538.

comment:4 by Remy Blank, 13 years ago

Milestone: plugin - mercurial

comment:5 by anonymous, 6 years ago

now reproduced on 1.2 version in FreeBSD 11.1 with the latest mercurial (v.4.*)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.