Re: [fossil-users] How to search for changes in checkins?

2016-06-09 Thread Richard Hipp
On 6/9/16, Marko Käning  wrote:
>
>> (4) Initializing the search index means computing all historical
>> check-in diffs.  That might take a while.  Figure about 10 check-ins
>> per second.  Fossil itself currently has 9506 check-ins, so total
>> initialization time would be 15 minutes.  (The "10 checkins per
>> second" number is a guess.  Processing might go significantly faster.
>> We will need to experiment to know.)
>
> One could make this indexing optional, perhaps, no? A bit like the
> indexing of Wiki/Docu/Tickets info in the UI…

Yes, certainly.  It would be just another check-box option beside all
of the other search categories.

Someone also suggested that there ought to be a search for Fossil's
own internal help screens and documentation.  I agree.  That wouldn't
be hard to do - I just haven't gotten around to doing it yet...

-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] How to search for changes in checkins?

2016-06-09 Thread Warren Young
On Jun 9, 2016, at 8:40 AM, Andy Bradford  wrote:
> 
> Hello,
> 
> Is it possible to search for actual changes in checkins? For example, if
> I have a repository that has a macro:
> 
> #define MACRO { if (x) y; }
> 
> Can I search  Fossil for all checkins that included  replacing code with
> MACRO as a change?

While short of the FTS solution proposed by drh, annotate/blame may be 
sufficient for your purposes.  Just grep its output for MACRO.  That will give 
you the checkin ID of the most recent change to that line, which in all 
likelihood will be the one where it replaced the prior program text.
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] How to search for changes in checkins?

2016-06-09 Thread Marko Käning
Hi Richard,

On 09 Jun 2016, at 17:16 , Richard Hipp  wrote:
> I've long thought that this would be a very useful feature to add.

+1


> (1) A full-text index uses roughly 30% as much disk space as the
> content that is being indexed.  (This is a mathematical property of
> full-text search - not a deficiency in Fossil's implementation.)
> Doing full text search on all check-in diffs might result in a very
> large search index.

Well, 30% isn’t an issue in most cases, I figure.


> (4) Initializing the search index means computing all historical
> check-in diffs.  That might take a while.  Figure about 10 check-ins
> per second.  Fossil itself currently has 9506 check-ins, so total
> initialization time would be 15 minutes.  (The "10 checkins per
> second" number is a guess.  Processing might go significantly faster.
> We will need to experiment to know.)

One could make this indexing optional, perhaps, no? A bit like the
indexing of Wiki/Docu/Tickets info in the UI…

Greets,
Marko

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] How to search for changes in checkins?

2016-06-09 Thread Richard Hipp
On 6/9/16, Andy Bradford  wrote:
> Hello,
>
> Is it possible to search for actual changes in checkins? For example, if
> I have a repository that has a macro:
>
> #define MACRO { if (x) y; }
>
> Can I search  Fossil for all checkins that included  replacing code with
> MACRO as a change?
>

Fossil does not support that feature at this time.  The closest it
comes is searching the text of the check-in comment.

I've long thought that this would be a very useful feature to add.
But there are technical questions to be answered and issues to
overcome:

(1) A full-text index uses roughly 30% as much disk space as the
content that is being indexed.  (This is a mathematical property of
full-text search - not a deficiency in Fossil's implementation.)
Doing full text search on all check-in diffs might result in a very
large search index.

(2) The default tokenizer for SQLite's full-text search engine is
designed for ordinary human-readable text, not for program code.  I
don't know how well the search would work when applied to C-code.

(3) A diff normally includes several lines of unchanged context before
and after the lines that were modified.  How much of this context
should be included in search index?  The current default for display
is 6 lines.  Do we want more or less than that in the search index?

(4) Initializing the search index means computing all historical
check-in diffs.  That might take a while.  Figure about 10 check-ins
per second.  Fossil itself currently has 9506 check-ins, so total
initialization time would be 15 minutes.  (The "10 checkins per
second" number is a guess.  Processing might go significantly faster.
We will need to experiment to know.)
-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


[fossil-users] How to search for changes in checkins?

2016-06-09 Thread Andy Bradford
Hello,

Is it possible to search for actual changes in checkins? For example, if
I have a repository that has a macro:

#define MACRO { if (x) y; }

Can I search  Fossil for all checkins that included  replacing code with
MACRO as a change?

Thanks,

Andy
-- 
TAI64 timestamp: 400057597ff0


___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users