Subject: Re: bug#79408: 31.0.50; VC commands for cherry-picking

From: Sean Whitton <[email-masked]>
Date: Wed, 10 Sep 2025 10:53:14 +0100

Hello,

On Tue 09 Sep 2025 at 09:15pm +03, Juri Linkov wrote:

> We could also try to use the same UI as in e.g. Dired:
>
> - in a *vc-change-log* buffer use 'm' to mark revisions;

Right, this is what I was thinking already.

> - type 'C' to copy or 'M' to move (actually 'R' in Dired);

Yes, let's use 'C' to cherry-pick.  Currently I'm not planning something
for moving revisions between branches, but we could use 'R' for that if
we decide to add it later.

> - select a branch name in the minibuffer with completion.

'git cherry-pick' and 'hg graft' work only for applying commits onto a
branch that's currently checked out.  So we would have to implement our
own complex thing, for each backend, if we wanted to be able to
cherry-pick onto arbitrary branches.  I'm also not sure how useful it
would be to be able to do that, to be honest.

On the other hand, if there are other working trees, prompting which
working tree to cherry-pick onto could be implemented in generic code
and would be an alternative to using C-x v w w to switch the working
directory or invoke C-x v b l from the other working tree.  So I'll
implement that.  C RET will always mean to cherry-pick to the current
working tree's branch.

-- 
Sean Whitton