Show hits as a diff

Bug #480684 reported by Display Name
2
Affects Status Importance Assigned to Milestone
bzr search plugin
Invalid
Wishlist
Unassigned

Bug Description

It would be nice if we could do something like this:

$bzr search -r *utf-8*
revision 10:
    dir/file.py
        + a = b.encode('utf-8')
        - # foo bar utf-8
revision 15:
    dir/file.py
        - a = b.encode('utf-8')

It would be nice too if we could do this also in qbzr. You'd type in the search box and select "changes" or so in the drop-down menu.

description: updated
Revision history for this message
Robert Collins (lifeless) wrote :

I'm not entirely clear on what you mean. Do you mean:
'show the entire diff for a revision when a search matches it'

or
'allow full regex queries not just word matches'

or something else?

Changed in bzr-search:
status: New → Incomplete
Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 480684] Re: Return matching revisions

On Tue, 2010-02-09 at 00:28 +0000, Renato Silva wrote:
> Imagine you rename some_method() to other_name(). Everything seems to
> work fine, but after some time you get a bug report, and you suspect
> that the change has introduced that bug. However, you don't remember
> anymore when and why the method was renamed. So you want to search for
> code changes containing 'some_method' to find what commit did the
> rename. Currently, if you didn't mention the name in the commit comment,
> you have to manually inspect bzr log -p or so.
>
> So I mean 'show the revisions whose diff contains the search string'.

bzr search searches the diff between revisions already. So I'm not sure
what change you are asking for :)

-Rob

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 480684] Re: Return matching revisions

On Tue, 2010-02-09 at 01:46 +0000, Renato Silva wrote:
> bzr search PreferencesProvider works, but bzr search Preferences
> doesn't.

bzr-search doesn't do stemming - you can find what search terms there
are using suggestions - 'bzr search -s Preferences'. Likewise it doesn't
do regex searching.

> bzr search 'sidebar' works, but bzr search 'no-sidebar' doesn't.

Nor does it have a suffix index (where you put rabedis and rabedis-on in
an index and can then find both sidebar and no-sidebar efficiently).

> Also, the output is not effective, you don't have the revision number,
> and it's not so well formatted in my opinion:
> http://pastie.org/815629.txt

indeed, it can be improved - patches to do are welcomed. For now though,
lets keep trying to refine this bug into something more actionable -
e.g. a regex engine, stemming or suffix matching, etc.

-Rob

summary: - Return matching revisions
+ Show revisions whose diff contains the search string
Revision history for this message
Robert Collins (lifeless) wrote :

Renato, you are asking or a variety of different things, which is fine.

For only searching texts see https://bugs.edge.launchpad.net/bzr-search/+bug/247794
For searching things that are not simple words see https://bugs.edge.launchpad.net/bzr-search/+bug/380921
I've made this bug into 'show hits as diffs'.

I think that that would be fine; I'm not convinced it should be the default though.

summary: - Show revisions whose diff contains the search string
+ Show hits as a diff
Changed in bzr-search:
status: Incomplete → Confirmed
importance: Undecided → Wishlist
Changed in bzr-search:
status: Confirmed → Invalid
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.