monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] rfc on h: selector behavior


From: Daniel Carosone
Subject: Re: [Monotone-devel] rfc on h: selector behavior
Date: Fri, 14 Oct 2005 07:32:08 +1000
User-agent: Mutt/1.4.2.1i

[Be warned, idle late-night musings, finished in the morning
pre-coffee..]



On Thu, Oct 13, 2005 at 01:34:21AM -0700, Emile Snyder wrote:
> > emile> erase_ancestors(b:*)
> > emile> or
> > emile> union (erase_ancestors(b:b1), erase_ancestors(b:b2), ...)

> For what it's worth, my expectation as a user would be the
> union(heads(b1), heads(b2), ...), ie., interpret h:branchglob to mean
> "heads of the specified branches"

agreed. put it another way, if h:com.foo.* doesn't mean the heads of
all those branches, what does?  because that's something i'm likely to
want.

A good way to think about these kinds of choices is "if i had both,
what would I call them to tell them apart?" What result does the other
interpretation give you -- and can you think of a better selector name
for that operation?

The erase_ancestors(b:*) case gives you all the heads that aren't also
branch points for other branches within the glob.. Put another way,
the dead-ends of code development for a namespace. If I'm looking for
meta-heads across the combined span of multiple branches, it's
probably because I'm looking for changes to propagate between branches
- these heads represent all the points i'd need to propagate in order
to reconnect the branches, probably to the name-space parent.

In monotone terminology, 'heads' are microbranches, divergence within
a branch resolved with 'merge'. I really do think the union form,
representing the heads of all the branches matching the name glob, is
most consistent with that terminology. The cross-branch form might be
called "propagation points" or something similar, and the selector
would return a "propagation set" of revisions, and be named
accordingly.

(What about the inverse? Is there a selector for the divergence point
of a branch from its parent? it's common CVS practice to put a branch
tag on that point, for later reference - such a selector in monotone
would make that unnecessary.)

I'm also not sure that all of these requirements and usages are
satisfied by simply 'magic selectors'.  I've been thinking for a while
that we might be needing some form of selector algebra on the command
line. What if we could use the erase_ancestors() syntax, and other set
and tree operations, directly?  The 'fantasy syntax' lca: examples
given recently are a really good illustration of what i've been
thinking, too.  It might start with an OR operation in selector
strings, to complement the / for AND.  Many of the magic selectors are
then just some syntactic sugar around frequently used longer forms.

Note also that the cross-branch usage assumes something about the
namespace construction - or at least relies on namespace conventions
for greatest utility. Lets say I wanted to find all the loose ends of
foo.experimental.* branches. A different syntax would let me or
together several specific branch names and then take some operation
(such as either of these) on that.

--
Dan.

Attachment: pgp93w7Fj3W8T.pgp
Description: PGP signature


reply via email to

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