Edgewall Software

Changes between Initial Version and Version 1 of Ticket #8538


Ignore:
Timestamp:
Aug 9, 2009, 11:54:50 AM (15 years ago)
Author:
Christian Boos
Comment:

Any chance for me to get a clone of this repository (or better, a small sample one that will produce similar errors)?

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #8538

    • Property Keywords unicode added
    • Property Milestone 0.11.6not applicable
  • Ticket #8538 – Description

    initial v1  
    66
    77When you want to open dir in browse source with a file or child file with an accented charcater (ó) the error shows:
    8 
     8{{{
    99Most recent call last:
    1010File "/usr/local/lib/python2.5/site-packages/Trac-0.11.4-py2.5.egg/trac/web/main.py", line 435, in _dispatch_request
     
    1717  entries = [entry(n) for n in node.get_entries()]
    1818File "/var/trac/scrum.pxgo.es/norprevencion_openerp/plugins/TracMercurial-0.11.0.7-py2.5.egg/tracext/hg/backend.py", line 697, in get_entriesFile "/var/trac/scrum.pxgo.es/norprevencion_openerp/plugins/TracMercurial-0.11.0.7-py2.5.egg/tracext/hg/backend.py", line 605, in findnode
     19}}}
    1920
    2021Patch:
    2122
    2223In TracMercurial-0.11.0.7-py2.5.egg/tracext/hg/backend.py method findnode:
    23 
     24{{{
    2425for f in self.repos.repo.changectx(rev).files():
    2526    f = unicode(f, 'utf-8', 'replace') 
     27}}}
    2628
    2729#convert to unicode with replace and utf-8 encode and the name of file process correctly.
    2830
    2931Then the dir works if the file is another dir else the error shows in other part of code:
    30 
     32{{{
    3133Most recent call last:
    3234File "/usr/local/lib/python2.5/site-packages/Trac-0.11.4-py2.5.egg/trac/web/main.py", line 435, in _dispatch_request
     
    4042File "/var/trac/scrum.pxgo.es/norprevencion_openerp/plugins/TracMercurial-0.11.0.7-py2.5.egg/tracext/hg/backend.py", line 691, in get_entriesFile "/usr/local/lib/python2.5/posixpath.py", line 65, in join
    4143  path += '/' + b
    42 
     44}}}
    4345Patch:
    4446
    4547In TracMercurial-0.11.0.7-py2.5.egg/tracext/hg/backend.py method get_entries the same:
    46 
     48{{{
    4749for entry in self.entries:
    4850    entry = unicode(entry, 'utf-8', 'replace')
    49 
     51}}}
    5052#convert the file's name to unicode with replace and encode in utf-8
    5153
    5254Then the dir with file works but when you want to open the file and error shows:
    53 
     55{{{
    5456Most recent call last:
    5557File "/usr/local/lib/python2.5/site-packages/Trac-0.11.4-py2.5.egg/trac/web/main.py", line 435, in _dispatch_request
     
    6365File "/usr/local/lib/python2.5/site-packages/Trac-0.11.4-py2.5.egg/trac/web/href.py", line 148, in __call__
    6466  if arg != None])
     67}}}
    6568
    6669This bug raise on Trac, i don't know if in new versions it solves, occurs beacause teh name of file have a accented character and in url not escapes the accented character.