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?
Doesn't have a much sense in terms of MQ. I'll answer in assumption "One patch in MQ-queue must get additional fixes and others saved as is"
No, it's terrible worst choice
Apply this single needed patch in queue
make needed changes, refresh patch
unapply and move to the old position in queue