monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] Commit a child of 2 parents


From: Nathaniel Smith
Subject: Re: [Monotone-devel] Commit a child of 2 parents
Date: Sun, 15 Jan 2006 17:29:01 -0800
User-agent: Mutt/1.5.9i

On Sun, Jan 15, 2006 at 07:59:55PM -0500, Yury Polyanskiy wrote:
> Thanks all for replies!
> 
> I was 99% sure that the solution would be to commit my merged tree as a
> child to revA and then call some fancy "monotone db execute 'insert...'"
> to draw an additional edge in revision graph from revB to a newly
> created revC. 
> 
> Does anyone has a short explanation why such ``drawing'' is impossible?
> What does it ruin?

Because edges are not stored separately from revs.  A rev contains a
list of its parents in its text; a revid is the hash of that text.  So
adding a new parent would require actually going and modifying the
existing rev's text, and thus changing its id, which invalidates
existing certs, etc.

The "concepts" chapter of the manual hopefully covers this sort of
thing:
  http://www.venge.net/monotone/docs/Concepts.html
If anything's unclear then we'd love to hear :-).

Doing all these adjustments by hand while maintaining data consistency
would be very tricky.  You basically end up duplicating big pieces of
monotone's own code.

Doing it from _inside_ the monotone code is less problematic; we can
generate whatever revs we want pretty straightforwardly.  If you
really want an expeditious hack, you're probably best off figuring out
some way to hack some sort of special purpose command into monotone.

What system are you coming from, again?  There is some code already
to do lossless imports from git repositories (which is starting to
rot, but we should fix that)); adding code to do the same from other
VCSes is probably a bit more work than writing a quick hack in shell
or whatever, but could also be quite valuable.

-- Nathaniel

-- 
"...All of this suggests that if we wished to find a modern-day model
for British and American speech of the late eighteenth century, we could
probably do no better than Yosemite Sam."




reply via email to

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