[RFC] New core command: graft

Matt Mackall mpm at selenic.com
Mon Oct 10 15:23:25 CDT 2011

On Mon, 2011-10-10 at 21:40 +0200, Antoine Pitrou wrote:
> On Mon, 10 Oct 2011 13:42:56 -0500
> Matt Mackall <mpm at selenic.com> wrote:
> > > 
> > > Like for merges, something like:
> > > 
> > > $ hg graft 81380082d216
> > > 3 files updated, 0 files unrevolved, remember to commit.
> > 
> > This was already in my example, so the real question is "how do we find
> > out we're in the middle of a graft AFTER that?"
> Well, I don't understand the concern. If you've just made a graft, why
> would you forget about it?

Because I went to lunch, came back, and now have to figure out what is

>  And is it important that the user be
> reminded at every step?

No, but it has to be available.

> > The questions is how do we add this new feature without rewriting
> > everything. We don't want to add new logic to just about every other
> > command and extension so that it now interacts properly with a graft,
> > which is where this snowball of yours is going.
> I guess there's a tension between providing a light-weight command
> that doesn't touch the rest of the core (like "hg transplant") and
> something more sophisticated that addresses the use cases of a larger
> base of people.

I'm actually explicitly not interested in making a tool that completely
covers the needs of all users. The result of that philosophy is always
an unspeakable horror. I'm interested in "works well for most while
remaining clean". Compare with "import this".

> But other features such as named branches are now everywhere too, not
> just in "hg branch" and "hg branches".

Indeed. It could not be otherwise for that feature to have any value at
all. But people have been using transplant happily for years without
asking for it to be integrated with commit even once.

Mathematics is the supreme nostalgia of our time.

More information about the Mercurial-devel mailing list