[PATCH 2 of 5 RFC] revset: add a predicate for finding transplants

Matt Mackall mpm at selenic.com
Mon May 14 02:35:58 CDT 2012


On Mon, 2012-05-14 at 01:30 -0400, Matt Harbison wrote:

> Questions:
> - Is not living in the extensions OK?

Yes.

> - Is the name distinct enough from transplant's 'transplanted()' form to be
>   useful?
> - Since both predicates without a revision select the destination changesets,
>   there's nothing to find all nodes that are transplant sources.  Should I add
>   one more predicate to select the source or all sources?  I can't think of a
>   good name. (I suppose this applies to all except convert).

??

> - Given that the goal is to find where a changeset is propagated, it didn't
>   seem to make sense to support taking in a set.  Or should it use
>   revset.getset() anyway and make sure the size is 1 if a rev is provided?
>   rev() and id() didn't take this route.

I can see use-cases for this, for instance:

 grafted(branch(default))  # find anything that's a graft from default

..but I also think we want:

 grafted()

But really, I think we want a single predicate that will identify any of
grafted/rebased/transplanted/converted. Perhaps:

 origin([id|set])

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list