Search code examples
mercurialrecordpatchmq

Selective revert in mercurial, like record but in reverse


I was debugging a crash by adding some printfs. Once I had some changes that avoided the crash, it was time to complete the fix by adding some more changes.

At that point I wanted to remove the printfs and continue with the changes that weren't yet ready for a commit.

Is there a mercurial extension that lets me revert temporary changes like hg record lets me select just the useful bits ? One way would be to qrecord, then delete the patch. But maybe there's something simpler.


Solution

  • You can use hg revert -i (which is still experimental and thus shows up only in hg help revert -v).