What we did at UBZ

Jan Hudec bulb at ucw.cz
Fri Nov 18 20:48:22 GMT 2005


On Fri, Nov 18, 2005 at 07:59:00 -0600, John A Meinel wrote:
> Michael Ellerman wrote:
> > On Fri, 18 Nov 2005 17:27, Martin Pool wrote:
> >> On 18 Nov 2005, Michael Ellerman <michael at ellerman.id.au> wrote:
> >>> If we end up with _bzr we could implement a "bzr grep" which skips .bzr,
> >>> a few other tools do this, but it's a bit ugly and many people will never
> >>> find it.
> >> It'd be quite nice to have a 'bzr grep' which knew how to search back
> >> through history, but that's a different point. 
> > 
> > Ooo, that would be cool. You could have:
> > 
> > # bzr grep -r 1204 "foo"
> > 
> > which searchs all files in revision 1204 for "foo". And also:
> > 
> > # bzr grep --search "something" somefile.c
> > 
> > which searches backwards through the history of somefile.c until it gets a 
> > match (or perhaps through all of history with an option).
> > 
> > cheers
> > 
> 
> We do have "bzr log --message foo" which will search the old logs
> messages. (the message is interpreted as a regex).
> 
> But I can see wanting to grep the actual contents of the old revisions.
> 
> And I can see doing stuff like checking multiple revisions, and having
> "bzr grep" be able to prefix correctly (so filename at revno: text)

Bzr uses weaves, right? And weave is a list of all lines that ever existed,
annotated by revision in which they were created and deleted. So it could
grep the weave and print all matching lines, prefixed by the revision
interval in which they existed (only matches in particular revision interval
could be requested).

With knits it will be a little bit harder, but should not be much.

-- 
						 Jan 'Bulb' Hudec <bulb at ucw.cz>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051118/1154d8d2/attachment.pgp 


More information about the bazaar mailing list