[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] How to get the newest cert beginning with a certain

From: Christof Petig
Subject: Re: [Monotone-devel] How to get the newest cert beginning with a certain substring?
Date: Thu, 03 Feb 2005 14:46:39 +0100
User-agent: Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.7.5) Gecko/20050105 Debian/1.7.5-1

Nathaniel Smith schrieb:
On Wed, Feb 02, 2005 at 10:24:41AM +0100, Christof Petig wrote:

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)

I think the answer is that you don't want to use the date cert.  You
want to use the ordering imposed by ancestry.

You are right. Ordering them by (revision) date was a (perhaps possible)
optimization (which was easily adoptable by sql).

The model is similar to 'heads' -- 'heads' finds revisions that have a
given branch cert, that have no descendents that have that same branch
cert.  s/branch/cvs_revision/ and you have exactly what you want to do

Since I actually decided to ignore the branch (this way you can import
new parts of a branch into a different branch without needing the
(already existing) branch point in the dest branch) I tend to parse each
and every cvs-revision tag in the database (ouch).

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.

It's tricky, since cert values need to be SELECT'ed on (at least,
branch cert values do), and IIUC gzipped data is not necessarily
normalized.  Random idea - store the information in a .mt file in the
filesystem?  Then a cert could be used to say "this revision has an
up-to-date .mt-cvs", and nothing else.  Could actually use .mt-attr
for this, though at some risk of annoying people by cluttering it
up with stuff they shouldn't touch...

- I might need multiple tree states for different repositories (yes,
that's sick, but I might actually need it to sync between two different
CVS repositories)
- There's no way to add such an internal file to an already existing
- You get all kinds of bad things like conflicts merging this file,
people trying to edit it, people commiting revisions with this file in it

[For now I did not gzip the cert because monotone-viz does not
understand gzipped certs (II-guess-C)] and it's nice to see its contents


PS: Your sanity checks really slow cvs_pull down, I currently import a
1985 edge (revisions) repository into a test database and its at #792
after 138:21 cpu minutes (on a 3GHz high end machine). Looks like I will
provide a "--relaxed" switch in my branch to speed my tests up (to a
bearable speed). Burn test your CPUs with monotone :-( ... ;-)
PPS: cvs_pull is already capable of a full (HEAD branch) remote import.

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]