문제

I've got some MQ patches with work implemented in file path project/feature_a, but I need to move these changes to project/feature_b. Is there an easy way to do this?

도움이 되었습니까?

해결책

The only way is to modify the patch files directly with a tool or an editor.

You must (of course) do this while the patches are unapplied, so begin with

$ hg qpop -a

Then edit the patches in .hg/patches using either an editor of your choice or perhaps by using filterdiff from patchutils. Running

$ filterdiff --strip 3 \
             --addoldprefix a/project/feature_b/ \
             --addnewprefix b/project/feature_b/ your-patch

might do the trick by stripping off the old a/project/feature_b prefixes before adding new ones.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top