My use case:
I noticed that I made unnecessary edit in earlier revision and I want to discard one hunk from patch, and preserve all other changes for this file.
I've tried to edit the patch inside .hg/patches/
and then hg qrefresh
, but after that the hunk reappear.
Possible solutions:
- Export that patch, cut all except unneeded hunk, and apply this patch in reverse.
- Somehow make workdir "dirty" with patch that contains hunk, and then edit file nicely with GUI of my IDE, which polls VCS and highlights changes, and offer option to rever these changes.
Questions:
- Is editing
.hg/patches
a valid practice? - How to make workdir dirty by neede patch and then reapply it with edits? Like
git reset --soft
? - Is there any other convenient methods to do subj?