Bug 5056 - Improve error message when histedit is run on changesets with child nodes
Summary: Improve error message when histedit is run on changesets with child nodes
Status: RESOLVED FIXED
Alias: None
Product: Mercurial
Classification: Unclassified
Component: histedit (show other bugs)
Version: 3.5.2
Hardware: PC Linux
: wish feature
Assignee: Bugzilla
URL:
Keywords: easy
Depends on:
Blocks:
 
Reported: 2016-01-21 13:01 UTC by Arun Chandrasekaran
Modified: 2016-03-15 00:00 UTC (History)
5 users (show)

See Also:
Python Version: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arun Chandrasekaran 2016-01-21 13:01 UTC
The error message shown when histedit'ing a changeset with child nodes is

"abort: cannot edit history that would orphan nodes"

This message could be improved to something more intuitive, like

"histedit can be run only on leaf nodes"
"can only run histedit while current revision has no children"

I frequently use histedit and I tried to run histedit on non-leaf nodes by mistake and I was confused by "abort: cannot edit history that would orphan nodes". Googling didn't help much as well.
Comment 1 Arun Chandrasekaran 2016-01-21 16:32 UTC
Amending a changeset with child gives the below message.

$ hg ci --amend
abort: cannot amend changeset with children

For the sake of uniformity, it might be better to change the histedit abort message to "abort: cannot histedit changeset with children".
Comment 2 Ryan McElroy 2016-01-22 02:04 UTC
The first two are not technically correct, so I wouldn't like them. The third suggestion of "cannot histedit changeset with children" does sound technically correct to me and more consistent, so +1 on that wording if we change it.
Comment 3 Matt Mackall 2016-01-22 13:55 UTC
The existing message is perfectly succinct and descriptive, but I suppose we can't depend on everyone knowing what the verb "to orphan" means.
Comment 4 HG Bot 2016-03-02 18:45 UTC
Fixed by https://selenic.com/repo/hg/rev/89e04a33e958
liscju <piotr.listkiewicz@gmail.com>
histedit: improve error when run on nodes with children (issue5056)

(please test the fix)
Comment 5 Jinank Jain 2016-03-03 12:45 UTC
Is this issue still open then I would like to work on this?
Comment 6 Pierre-Yves David 2016-03-07 10:01 UTC
As pointed but the message above yours. This has been fixed.
Comment 7 Bugzilla 2016-03-15 00:00 UTC
Bug was set to TESTING for 7 days, resolving