Question about branching and merging
Lawrence Stewart
lstewart at room52.net
Tue Aug 26 03:58:46 UTC 2014
Hi all,
Hoping to get some thoughts on how to manage the following.
Given a repository with branch structure and history like this:
A1---A2---A3---A4---A5---A6---A7->
\
B1---B2---B3---B4---B5---B6---B7->
\ SYNC MERGE \
C1---C2---C3---C4---C5---C6->
\ \ \
D1--------D2---D3->
"A" and "B" branches are vendor sources tracked on a per commit basis,
with "A" being running "trunk" development and "B" being a stable branch
which receives bug fixes and backported functionality from "A".
Unfortunately the Hg repo doesn't track history for commits backported
from "A" to "B" due to hg convert not knowing about such things.
"C" and "D" are our private development and production branches
respectively based on the vendor's stable branch "B", with "C" receiving
periodic sync merges from "B", and "D" receiving cherry picked commits
from "C" (including the sync merges) once they have passed internal
review and testing.
We want to transition over to using the vendor's dev branch "A" as the
basis for our private development work i.e. create a private branch "E"
off "A".
During the transition period of a few months, our core development work
will continue on branch "C", and we want to keep "E" in sync with "C"
via sync merges while we shake out issues with "E". Eventually "E" will
become the new equivalent of "C", and an "F" will be created off "E" to
act as the new "D".
Is there a sane way to manage sync merging "C" into "E" such that we
preserve the state of E's base branch "A" in preference to C's base
branch "B"?
I've played around a bit and can't seem to get sane merging behaviour
e.g. files deleted in "A" get reintroduced into "E" when sync merging
"C" into "E".
Ideas/insights/clue bat greatly appreciated.
Cheers,
Lawrence
More information about the Mercurial
mailing list