bzr should support grepping through the contents of a revision.

Bug #161250 reported by Evan
2
Affects Status Importance Assigned to Milestone
bzr-grep
Fix Released
Medium
Unassigned

Bug Description

bzr at present does not support grepping through an entire revision, which could be quite useful if you are looking for a specific text pattern at a specific time in the history.

Ideally I'd like to see something like this:
bzr hgrep -r586 media
debian/changelog: subdirectories of /media.

I believe hgrep is supposed to do this, but it is currently broken:
evan@bunny:~/bzr/partman-basicfilesystems.ubuntu$ bzr hgrep media
bzr: ERROR: bzrlib.errors.ObjectNotLocked: <WorkingTree4 of /home/evan/bzr/partman-basicfilesystems.ubuntu> is not locked

Revision history for this message
Martin Pool (mbp) wrote :

It does seem like the bug is 'hgrep is broken'. Maybe hgrep should be an included battery (and renamed to just 'grep'?)

Changed in bzr:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
James Westby (james-w) wrote : Re: [Bug 161250] Re: bzr should support grepping through the contents of a revision.

On (09/11/07 19:16), Martin Pool wrote:
> It does seem like the bug is 'hgrep is broken'. Maybe hgrep should be
> an included battery (and renamed to just 'grep'?)
>

There is also a grep plugin that is damn useful, and should perhaps be
included. I believe there purpose is different, and it sounds like grep
is actually what the reporter is looking for.

Thanks,

James

--
  James Westby -- GPG Key ID: B577FE13 -- http://jameswestby.net/
  seccure key - (3+)k7|M*edCX/.A:n*N!>|&7U.L#9E)Tu)T0>AM - secp256r1/nistp256

Revision history for this message
John A Meinel (jameinel) wrote :

IIRC the 'grep' plugin greps through all files in a single version, the 'hgrep' searches through history (somehow).

It seems close to trivial to fix that specific bug in hgrep (it just requires adding a tree.lock_read()/tree.unlock() at the appropriate time.)

But it sounds like hgrep isn't very actively maintained.

Revision history for this message
Vincent Ladeuil (vila) wrote :

Should we transfer the grep and hgrep plugins to launchpad if the maintainer is not responding anymore ?
Mail sent to Michael Ellerman to ask him about his plans regarding the future of the plugins.

Vincent Ladeuil (vila)
Changed in bzr:
assignee: nobody → v-ladeuil
Revision history for this message
Vincent Ladeuil (vila) wrote :

Re-assigning to bzr-grep where the bug is already fixed (I think).

affects: bzr → bzr-grep
Changed in bzr-grep:
assignee: Vincent Ladeuil (vila) → nobody
Revision history for this message
Parth Malwankar (parthm) wrote :

Thanks for transferring this bug to bzr-grep. Yes, bzr-grep closes this bug.

Changed in bzr-grep:
status: Confirmed → Fix Released
Revision history for this message
Martin Pool (mbp) wrote : Re: [Bug 161250] Re: bzr should support grepping through the contents of a revision.

On 11 March 2010 04:06, Parth Malwankar <email address hidden> wrote:
> Thanks for transferring this bug to bzr-grep. Yes, bzr-grep closes this
> bug.

:-)

The next step would be to support grepping a revision range, or all of
history - or do you do that already?

--
Martin <http://launchpad.net/~mbp/>

Revision history for this message
Parth Malwankar (parthm) wrote :

On Thu, Mar 11, 2010 at 5:09 AM, Martin Pool <email address hidden> wrote:
> On 11 March 2010 04:06, Parth Malwankar <email address hidden> wrote:
>> Thanks for transferring this bug to bzr-grep. Yes, bzr-grep closes this
>> bug.
>
> :-)
>
> The next step would be to support grepping a revision range, or all of
> history - or do you do that already?
>

Good news is that revision range is already supported as per the usual
revisionspec format :-)

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.