Note: The scenario I describe here is not answered in Stack Overflow: Completely manual Mercurial merge.
I will explain my query with an example. Assume I start off a Mercurial repository to design a car:
C:\Car$ dir
Car.cpp
Car.h
I work on the design of Car for quite a while and the repository looks like:
r0-r1-...-r100-(default)
At some point in time I branch default to SolarCarBranch to work on a solar powered car in parallel:
C:\SolarCar$ dir
Car.cpp
Car.h
Solar.cpp
Solar.h
After some more time, the repository looks like:
r0-r1-...-r100-...-r200-(default)
\--r101-...-r201-(SolarCarBranch)
How do I merge SolarCarBranch back to default?
Take note of the following complications in the merge I want:
- I should be able to continue work on both default and SolarCarBranch after the merge.
- There might be fuel efficiency fixes in
Car.cpp
andCar.h
in SolarCarBranch that I want pulled into default, however I do not want all the changes in those files. So, I want to cherry pick the changes I want to be included in default during the merge (aka manual merge). - I do not want
Solar.cpp
andSolar.h
appearing in default. The world may not yet be ready for a solar powered car. ;-)
What I have learned:
- This is possible by a
hg merge SolarCarBranch
- This can be achieved by setting
kdiff3.premerge=False
inMercurial.ini
- I do not know how to achieve this since
premerge=False
still merges/copiesSolar.cpp
andSolar.h
into default without asking me for permission.