monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] unexpected behavior from "merge_into_dir" + "propag


From: Timothy Brownawell
Subject: Re: [Monotone-devel] unexpected behavior from "merge_into_dir" + "propagate"
Date: Sat, 12 Jan 2008 21:02:16 -0600

On Sun, 2008-01-13 at 08:29 +1100, Daniel Carosone wrote:
> On Fri, Jan 11, 2008 at 11:30:00PM +0100, Lapo Luchini wrote:
> > OK. So far, so good.
> > Of course, I know from experience, when the "sub" library will be
> > updated I will only need a nice "mtn propagate sub main" to get the
> > latest changes.
> > But as I committed changes in the main project.. I just said to myself:
> > what about propagating in the other direction? I never read about it, I
> > don't think it was supposed to work that way... but let's just try:
> > what I get is "no merge necessary; putting
> > ad521c121cd82b0255e132b7ab2cee3e64e3c681 in branch 'sub'"
> > 
> > DUH? How come the full revision of the 'main' branch can be a valid
> > revision for the 'sub' branch???
> 
> Agreed. This is very surprising and unexpected for a user. 

merge_into_dir is a bit of a hack, and its purpose would be better
served by something similar to svn:externals (to work well, this would
need to be done in a way such that netsync would recognize it as a
dependency).

> I think it only happened because the rev you were propagating back to
> the libs branch was itself a rev created by propagating from the libs
> branch to the mainline.  In other words, this node is already the
> merge of the heads of the two branches -- and so the short-circuit
> logic that decides it can just add a cert has kicked in.
> 
> If this isn't true - if you've committed more changes on mainline -
> what happens?  If there is a check to stop you doing what you're
> doing, it needs to also take effect for the cert-only case.

Conceptually, merge_into_dir sets up an asymmetric relationship between
branches. But since we don't have a way to record that piece of
information, all future merge/propagate operations are completely
oblivious to it. There aren't any checks or anything, since there's
nothing for them to look at.

The only difference between propagating from libs to mainline and
propagating from mainline to libs is which branch the resulting revision
gets put in.


-- 
Timothy

Free (experimental) public monotone hosting: http://mtn-host.prjek.net





reply via email to

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