search shows non-ascii filenames as HTML-escaped string

Bug #383098 reported by Alexander Belchenko
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
bzr search plugin
Confirmed
High
Unassigned

Bug Description

Does `bzr search` supposed to be used from command-line or to produce HTML output?

C:\Temp\5>bzr index

C:\Temp\5>bzr search foo
bzr: ERROR: No matches were found for the search [u'foo'].

C:\Temp\5>echo foo > Тест.txt

C:\Temp\5>bzr add
adding "Тест.txt"

C:\Temp\5>bzr ci -m1
Committing to: C:/Temp/5/
added Тест.txt
Committed revision 1.

C:\Temp\5>bzr index

C:\Temp\5>bzr search foo
'#1058;&#1077;&#1089;&#1090;.txt in revision '<email address hidden>'. Summary: 'foo

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 383098] [NEW] search shows non-ascii filenames as HTML-escaped string

On Wed, 2009-06-03 at 09:38 +0000, Alexander Belchenko wrote:
> Public bug reported:
>
> Does `bzr search` supposed to be used from command-line or to produce
> HTML output?

Its meant to be used from the command line. loggerhead uses bzr's API
when generating search results.

> C:\Temp\5>bzr search foo
> bzr: ERROR: No matches were found for the search [u'foo'].

This is very programmatic; perhaps bzr-search should encode into the
output locale here rather than using repr.

> C:\Temp\5>bzr index
>
> C:\Temp\5>bzr search foo
> '#1058;&#1077;&#1089;&#1090;.txt in revision '<email address hidden>'. Summary: 'foo

Oh thats ugly. It's the result of

path = self.index.search((self.text_key,)).next()
return "%s in revision '%s'." % (path.document_name(), self.text_key[1])

It suggests to me that the path was indexed wrongly. Could you perhaps
add some output at line 731 of index.py:
            bar.finished()
+ print repr(terms)
        return terms.iteritems()

I suspect its a bug with the xml fast-pathing in bzr-search's
inventory.py.

I'd be interested if the new codepath for development-rich-root
repositories handles this better.

-Rob

 status confirmed
 importance high

Changed in bzr-search:
importance: Undecided → High
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.