On Sat, Nov 24, 2012 at 8:34 AM, Lluís Batlle i Rossell <[email protected]>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 < > [email protected]>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? > > Regards, > Lluís. > _______________________________________________ > fossil-users mailing list > [email protected] > http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users > -- D. Richard Hipp [email protected]
_______________________________________________ fossil-users mailing list [email protected] http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

