amend: allow aborting an `amend --patch` by saving an empty file (issue5925)
This patch fixes issue5925 by allow aborting a `hg amend --patch` call by saving
an empty patch file. This is similar to aborting of `hg amend` when commit
message is empty.
Test changes demonstrate the fix.
. $TESTDIR/testlib/pythonpath.sh
cat >> $HGRCPATH << EOF
[extensions]
docgraph=
EOF