Splitting a Changeset/Patch
Wednesday, February 13th, 2008I have a common problem with revision control:
- Clone a tree
- Start working on a problem X (say, adding valgrind annotations to MMgc) with edits to
GC.cpp
- Get distracted and start working on problem Y (say, MMgc crashing) with edits to
GC.cpp
- I now have unrelated changes in GC.cpp that I’d like to separate.
Dear lazyweb, is there a tool I can use to interactively separate out these changes into two changesets? The solution should work with my mercurial workflow, no “use git-rebase” comments please. I happen to be using patch queues, but a solution that worked on real mercurial changesets or on raw patches would also be acceptable. It happens that usually the patch hunks for problem X and problem Y are completely separate, so a simple tool that let me throw “this hunk for X, this hunk for Y” would probably be ok. Better would be something like a three-way merge tool where I can edit an intermediate state between a fixed start-point and end-point.