There's an alternative to history editing (aka mucking around in MQ) for fixing renames. The manual procedure is outlined here as the logic that the fixrenames extension uses.
The manual process is as follows. For each revision N for which there are renames not marked:
$ hg update n-1
$ hg revert --all --rev n
$ hg addremove -s 70
$ hg commit -m "Fix renames from n"
$ hg merge n
Note that the similarity flag sometimes requires fiddling. The reason is that renames almost never are pure renames. For example, renaming a class requires a change in the file as well as a change in the filename. Thus they aren't 100% the same. You'll have to review what addremove does and make sure that the added files are marked as "X (renamed from Y)".
In this fashion you can recover full history without a bunch of manual work. I had to do this today (without using the fixrenames extension) and it took me about 5 minutes to fix.
You can even apply this procedure where there are stacked changesets you need to fix.
The changeset graph would look like this. Consider changesets A, B, C & D. B and D had incorrect renames:
D
|
C
|
B
|
A
First we update to A, do an inplace revert to B, do the addremove and commit as E. Then we merge C into E as F since C didn't have anything wrong with it. You should see something like this:
F D
|\|
| C
| |
E B
|/
A
Now apply the same for D. We update to F, revert from D, addremove and commit to G. Now we just merge to close the extra head. You should see something like this:
H
|\
G |
| |
F D
|\|
| C
| |
E B
|/
A
If you want to convince your self that this worked you can always
hg diff -r D -r H
Depending on your tool, you'll see either no difference or renamed files listed but with no differences between them.
hg merge n
but the graph indicates a merge withn+1
? – Klystron