monotone-devel
[Top][All Lists]
Advanced

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

[Monotone-devel] Re: "prune-branch" cert implementation issues.


From: Willem Rein Oudshoorn
Subject: [Monotone-devel] Re: "prune-branch" cert implementation issues.
Date: 06 Jun 2005 03:03:51 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4

Michael Stone <address@hidden> writes:

> I'm attempting to give people a clean way to mark a revision as
> "no-longer-a-head-for-branch-X".  There are two use cases for a feature
> like this one:
> 
> 1) To ignore old branches which have subsequently been merged into the
> mainline.
> 2) To mark revisions as unsuitable for merging.

That is perfect timing!  I suggest something like that and
it turns out that you already thought of the same thing.
 
> Find all revisions with branch certs with value X.
> Remove revisions which are ancestors.
> Find all prune-branch certs with value X.
> For each revision, discard if it has an attached prune-branch cert.

Seems fine to me.
> 
> Two questions remain:
> How should the selection of update targets behave in the presence of
> prune-branch certs?

Well, what is the problem?  Just look at the "pruned" heads of the
desired branch and if there is:

  ONE head, just update to that head
  MULTIPLE heads, force the user to pick one
  ZERO heads, warn the user there are no active heads and do nothing.

of course you should still be able to supply a specific revision id
and that should always be headed.

am I missing something some subtle points?

> How should this certificate affect commands which rely on the old
> behavior of get_branch_heads()?

Well, as I see it monotone is just a graph of revisions.  This revision
graph is partitioned is subgraphs by a selection criteria.  Normally
this selection criterium is done by branch certificates, but as far 
as I can tell there is nothing special or magical about branches, 
theoretical speaking you could just make another subselection.  
(However it would be nice if this subselection is not totally disconnected.)

Some algorithmes that operate on the graph look at heads to facilitate to 
the user either merging or updating to a latest version.  
If the user has specifed with a prune-branch  that he is not interested 
in certain heads monotone should respect that choice.  
So I think the desired behaviour is that all commands should
use the new heads algorithm.

Wim Oudshoorn.






reply via email to

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