If try to amend a commit that is already pushed out, you will get:

% hg commit --amend
abort: cannot amend public changesets

Solution:

% hg phase --draft --force .
% hg commit --amend