Reputation: 31
I accidentally committed and pushed the incorrect revisions and was wondering if there was a way to undo the changes?
I used the rollback feature in TortoiseHg, but I don't believe that works when a commit has been pushed.
The push target is the publishing server. Both side do not have evolve extension.
I was planning on using back out or revert all files, but I have no idea which one is more appropriate to use.
Upvotes: 3
Views: 46
Reputation: 12988
Let's assume you had a series of revisions like this:
*-C-B-A
where C and B are the incorrect ones.
Since everything is pushed you can't erase C and B themselves. But you can undo their effects.
One approach is the following:
The final result would be
*-D-C-B-A
where D is the undo.
That approach mashes together the undo of both C and B. You might want to make that a bit more clear, so another approach would be:
In this second approach you now have two separate commits, in the reverse order of C and B, that undo each of them in turn.
The final result would be
*-B'-C'-C-B-A
Upvotes: 1