$ hg amend -e abort: cannot amend public changesets $ hg phase -d tip -f $ hg amend -e transaction abort! rollback completed abort: no username supplied (see "hg help config") $ hg amend -e warning: ignoring unknown working parent 5d40a9addebf! abort: cannot amend public changesets $ hg sum warning: ignoring unknown working parent 5d40a9addebf! parent: -1:000000000000 (no revision checked out) branch: default commit: 1221 unknown (clean) update: 48573 new changesets (update) I have changeset evolution enabled.
I again shot myself in the foot with changeset evolution. > hg ci > hg out > hg amend -e > hg glog # amendment didn't record anything > hg amend -e warning: ignoring unknown working parent 65a3d892ee2f! abort: cannot amend public changesets It seems that my amendment lost. How to restore it and my working copy?
Pierre-Yves, looks like some dataloss bugs in evolution.
We need to copy this pattern in the affected commands: http://www.selenic.com/hg/rev/a765611e06dc
> --- Comment #3 from Matt Mackall <mpm@selenic.com> --- > We need to copy this pattern in the affected commands: > > http://www.selenic.com/hg/rev/a765611e06dc Do you mean this pattern? http://www.selenic.com/hg/rev/3de04c07966a Actually 3de04c07966a + a765611e06dc. Is it possible to see merged diff of these two changes in HG? And in web interface?
The changeset you point to is old and only half-right. It refuses to allow record to proceed if you have no username set but have provided one on the commandline. So the code I point to is the pattern to use: "fail early if no username is given or configured" Adding Pierre-Yves.
That's clear. The question is: is it possible to see combined diff from these two changes with Mercurial? It may be useful.
Fixed by http://selenic.com/repo/hg/rev/b564330d4b1f Matt Harbison <matt_harbison@yahoo.com> amend: abort early if no username is configured with evolve enabled (issue4211) Amend will reuse the original username if a new one is not provided with -U, but obsolete.createmarkers() only considers ui.username() for the obsolete marker's metadata. Allowing the metadata field to be spoofed seems to defeat the point of the field in the first place. This covers 'evolve amend' and 'ci --amend' with evolve enabled. Without this, the transaction aborts but the parent changeset is set to -1. The corresponding test will be added to evolve separately. (please test the fix)
Bulk testing -> fixed