Richard Hipp <[email protected]> writes:
> For a report, I wanted to know the longest interval between to
> check-ins (not necessarily on the same branch) for a project. In
> other words, I wanted to know the longest period of inactivity for a
> project. Turns out this is relatively easy to do with Fossil and some
> SQL. This message is just to record my technique.
>
> Here's what you do:
>
> (1) Start up the SQL shell on the repository of interest: "fossil sql".
>
> (2) Enter the following query:
>
> SELECT
> (SELECT min(mtime) FROM event AS x
> WHERE type='ci' AND x.mtime>y.mtime) - y.mtime,
> datetime(y.mtime),
> (SELECT substr(uuid,1,10) FROM blob WHERE blob.rid=y.objid)
> FROM event AS y
> WHERE y.type='ci'
UNION ALL
SELECT
julianday('now') - max(z.mtime),
datetime(z.mtime),
(SELECT substr(uuid,1,10) FROM blob WHERE blob.rid=z.objid)
FROM event AS z
WHERE z.type='ci'
> ORDER BY 1 DESC LIMIT 20;
>
> The result table shows three columns which are the length of the
> check-in hiatus, the start of the hiatus, and the last check-in before
> the start of the hiatus. The 20 longest gaps are shown.
Ideally, the time since the last commit and now should also taken into
account as a period of inactivity.
> [...]
> I don't know if the above has any practical use for most people (or I
> would make it a new URI on the Fossil webserver) but it seems like fun
> and so I thought I would share.
It is fun. I did that for the same reason, with a much worser query:
http://www.mail-archive.com/[email protected]/msg23617.html
but it was really hot, that day.
The question from then still remains. As of fossil ad2dd95dbf,
SELECT count(*) FROM event
WHERE type = 'ci';
returns 10324. But after a
fossil ui
http://localhost:8080/timeline?n=11000&y=ci
shows only 10285 check-ins.
So, what are that 'ci' events, that are not shown at the timeline as
check-ins?
> Now remind me again, how would you do this in Git? ;-)
Fossil did a lot for me, much more than git or any other scm. I'm very
grateful for it.
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users