monotone-devel
[Top][All Lists]
Advanced

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

[Monotone-devel] Re: merging interface


From: Bruce Stephens
Subject: [Monotone-devel] Re: merging interface
Date: Wed, 17 Nov 2004 15:53:42 +0000
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3.50 (gnu/linux)

Olivier Andrieu <address@hidden> writes:

[...]

> Humm no, you can't do this anymore, can you?

Ah, probably not.

> Ancestry relations of revisions does derive from certs,

Does it?  It looks to me as though it's independent of certs:

CREATE TABLE revisions
        (
        id primary key,      -- SHA1(text of revision)
        data not null        -- compressed, encoded contents of a revision
        );

CREATE TABLE revision_ancestry
        (
        parent not null,     -- joins with revisions.id
        child not null,      -- joins with revisions.id
        unique(parent, child)
        );

> so commit will always create a new revision with a single ancestor
> and you'll still have two heads, no matter what certs you add. AFAIK
> merge is the only operation that can produce a revision with more
> than one ancestor (and thus reduce the number of heads).

Looks that way, yes.  Bother.  I guess one could hack up arbitrary
ancestry simply by doing "monotone db execute 'insert into
revision_ancestry ...'", but that's probably a rather dangerous thing
to do.  

Ah, that's probably not right, I guess: probably merged revisions
contain multiple old_revision/old_manifest ids.  So the
revision_ancestry table is probably an optimisation, and shouldn't be
touched.

Darn, it will require code changes.




reply via email to

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