histedit: allow fold+edit action
Augie Fackler
raf at durin42.com
Fri Dec 12 17:00:34 UTC 2014
On Fri, Dec 12, 2014 at 02:38:12PM +0100, Thomas De Schampheleire wrote:
> Hi,
>
> When using histedit, it regularly happens that I want to fold one
> changeset with another one, then edit the result.
>
> For example, with following three revisions, I want to fold revision 3
> into revision 1:
>
> 1 some change
> 2 some unrelated change
> 3 fix for first change
>
> Currently, as far as I can see, this is not possible in one step.
> The workaround is to use two histedit sessions, the first one:
>
> pick 1 some change
> fold 3 fix for first change
> pick 2 some unrelated change
>
> The second one edits the combined revision:
>
> edit 1 some change + fix
> pick 2 some unrelated change
>
>
> I would like to be able to say 'fold+edit' in one step, something like:
>
> pick 1 some change
> fold,edit 3 fix for first change
> pick 2 some unrelated change
>
> In case there are multiple folds, one should be able to add edit on
> any one of them, for example
>
> pick 1
> fold 3
> fold 4
> fold,edit 5
> pick 2
>
> or
>
> pick 1
> fold 3
> fold,edit 4
> fold 5
> pick 2
>
> or even
>
> pick 1
> fold 3
> fold,edit 4
> fold,edit 5
So, this one looks a little wonky to me. Why edit twice, when you're
just going to fold them together anyway?
> pick 2
>
>
> What do you think of such a feature?
It's not a horrible idea.
> Should I create a bug report for the request?
Yes. Note that I don't personally have need of it, and doing it
cleanly is probably going to be a bit convoluted (the code doesn't
really have a spot for splicing this in to my memory).
You may also be interested in a feature I've been asked for in the
past, but am deferring until changeset evolution is more ready (for
consistency reasons): a command you could insert that would drop you
into a working copy ready for using 'hg commit --amend'. For example:
pick 1
fold 4
fold 5
pause
pick 2
pick 3
(where "pause" is a name I just pulled out of thin air. We'd pick
something better/clearer when doing actual implementation.)
It hasn't been done yet because things get kind of mushy around the
edges when you allow the amending, as it kind of risks breaking things
in strange ways. If you look around on the -devel archives you can
probably find some of the discussion.
>
> Thanks,
> Thomas
> _______________________________________________
> Mercurial mailing list
> Mercurial at selenic.com
> http://selenic.com/mailman/listinfo/mercurial
More information about the Mercurial
mailing list