[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Monotone-devel] How to get the newest cert beginning with a certain sub
[Monotone-devel] How to get the newest cert beginning with a certain substring?
Wed, 02 Feb 2005 10:24:41 +0100
Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.7.5) Gecko/20050105 Debian/1.7.5-1
For my cvs synchronization I store the matching cvs revisions in the
revision cert "cvs-revisions" (as suggested by njs ;-) ). The format is like
"revision path\n" ...
Now to start an update I need to ask for
- the latest (using the date) cert and revision for a given
(- Perhaps every cert and revision matching the given module)
Taking heads as a template I see that the usual way would be to fetch
every revision which belongs to the branch (get_revision_certs(branch))
and then call erase bogus_certs, then iterate over the list of revisions
to find matching cvs_revision certs and corresponding date certs.
This looks somewhat inefficient to me to say the least. So better paths
would be to query only for revisions which have a certain tag
(cvs-revisions) and where a different tag (branch) has a certain value.
Even more efficient would be to query for the revision which corresponds
to the maximum of the date cert (sadly base64 encoding does not preserve
sort order - another reason to start using BLOBs) and which has a cert
(date) of a certain value and a different cert (cvs-revisions) which
begins with a certain string. [well this is easily possible in SQL
unless I gzip the cvs-revisions tag which I really should because of its
This brings me to another question: This cert is highly compressible and
also changes not much between revisions. This brings this cert near to
file characteristics. Is it planned to reference files (or any other
diff+gzip stored entity) from certs (I know this opens a can of worms
when it comes to synchronization)? Perhaps not, but once this topic
comes up a second or third time, I would suggest to implement it.
PS: Another solution would be to dump this revision storing cert [see my
correspondence with njs about CVS syncing] and rely on
Description: OpenPGP digital signature
- [Monotone-devel] How to get the newest cert beginning with a certain substring?,
Christof Petig <=