Open Bug 1703032 Opened 4 years ago Updated 4 years ago

`hg commit --amend -m` should warn or fail if the commit has a differential revision line.

Categories

(Developer Services :: General, enhancement)

enhancement

Tracking

(Not tracked)

People

(Reporter: mgaudet, Unassigned)

References

Details

Working with new contributors, you'll often have them try to update a revision and end up creating a new one. While there are many causes for this, one I have run into multiple times is the footgun that is hg commit --amend -m "..."

The problem with that command is that it silently will nuke the Differential Revision: ... line in a commit message, causing moz-phab to just create a new revision on re-submission.

See Also: → 1703039

Another option would be to automatically copy the Differential Revision: ... line from the old to the new commit description.

You need to log in before you can comment on or make changes to this bug.