[PATCH] histedit: improve error msg when run on nodes with children (issue5056)
Augie Fackler
raf at durin42.com
Mon Feb 29 22:45:43 UTC 2016
> On Feb 29, 2016, at 13:12, Piotr Listkiewicz <piotr.listkiewicz at gmail.com> wrote:
>
> To my ear, this doesn't quite sound right. I'm a little at a lost for
> better wording, though.
> I agree. It's missing some slight subtlety, in that you can histedit a
> node with children iff you edit all of the children.
>
> Choice of wording was proposed in bugtracker because of uniformity of ammend:
>
> $ hg ci --amend
> abort: cannot amend changeset with children
>
> But certainly im open to suggestions
There's an important distinction between histedit and amend, in that histedit works on a whole stack of changes at once, whereas amend only works on one at a time. That is, if you have a history graph like this:
1 - 2 - 3 - 4
\------5
and you try to do 'hg amend' on 3, there are two children that prevent that from happening. However, if you're on 4 and try to do 'hg histedit 3', that's still illegal (without evolution) because if revision 3 gets rewritten it would orphan revision 5. As a result, I think the histedit wording needs to be a little different. Does that make sense?
More information about the Mercurial-devel
mailing list