Re: [Lxr-dev] Tag "head" in its timeline (was: /bin/true as a zombie)
Brought to you by:
ajlittoz
|
From: Malcolm B. <ma...@br...> - 2001-08-02 11:14:55
|
Per Kristian Gjermshus wrote:
>That is true. What we should probably do is to have some sort of
>utility that can remove unwanted revisions from the database. I think
>it should be up to the user to decide how and when this deletion
>should be done. One option could be to keep all revisions newer than
>the last version for instance. One of my motives for this is to enable
>lxr to implement (or merge in) the features of both cvsweb and bonsai.
>
That's exactly what I want to see - some way of removing unused entries
from the database. Alas I have not come up with the magic SQL
incantations required yet - perhaps I'll try this weekend to see what I
can do.
Logically we need to first find all fileids that are not in any release
select f.fileid from files f, releases r where f.fileid not in {select
fileid from releases};
Then for these fileids, we need to zap any entries in the indexes table
where the symbol only appears in file(s) in the list. This is
complicated - I can't work out how the SQL would look, not being
terribly familiar with it. Then cleaning up the useage, status and
symbols table should be easy.
Cheers,
Malcolm
|