On Sat, Nov 24, 2012 at 08:59:58AM -0500, Richard Hipp wrote:
> On Sat, Nov 24, 2012 at 8:34 AM, Lluís Batlle i Rossell 
> <vi...@viric.name>wrote:
> 
> > On Sat, Nov 24, 2012 at 08:18:55AM -0500, Richard Hipp wrote:
> > > On Sat, Nov 24, 2012 at 7:57 AM, j. v. d. hoff <
> > veedeeh...@googlemail.com>wrote:
> > >
> > > > question: is there a straightforward (or sqlite-based) way to `grep'
> > > > through a specified file recursively backward in time through all
> > revisions
> > > > (or until first hit of the search pattern)?
> > > >
> > > > j.
> > > >
> > > > ps: yes, I would know now (after having learned how to use `fossil
> > > > artifact' correctly...) how to write a shell script doing that. but
> > that
> > > > would mean to dump the full content of each revision and pipe it
> > through
> > > > the grep which will become slow if there are too many revisions. so the
> > > > question is whether the functionality is already builtin (possibly
> > grepping
> > > > through the deltas instead).
> > > >
> > >
> > > This functionality is not built-in.  Nobody has ever thought of it before
> > > in 6 years of use, apparently, or at least has not mentioned it to me.
> >
> > I use this from time to time. My procedure goes through deconstructing the
> > database, grepping recursive, and resolving back the hashes with fossil ui.
> >
> 
> So what should the output look like?  Suppose we implement a command:
> 
>    fossil grep REGEXP FILENAMEGLOB
> 
> Which searches all historical versions of files that match FILENAMEGLOB for
> patterns that match REGEXP.  Suppose for concreteness that the regular
> expression is "xyzzy" and the file is "ex1.txt".  If there are 1000
> different revisions of ex1.txt, does it search them all looking for "xyzzy"
> and show each hit?  Or did it stop going backwards in time at the first hit
> it find?

I don't really know much, what I'd want. When I've used deconstruct, sometimes I
wanted to grep files, sometimes tickets, sometimes checkin comments, sometimes
in-file comments... I guess that 'grep' for only files, and some kind of FTS for
the rest would be very nice.

We use tickets extensively for bug tracking, but bugfixes happen as checkins,
and sometimes we hit "oh, I seem to remind that we had a case similar to this".
And then I've to grep all to try to find out, even with different keywords,
because who knows where I had that stored.

But as after having the results, I end up wanting to check all results with the
UI, I guess a ui option with links would be nicer.

Thank you,
Lluís.
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to