add merge history.
Fix phase1 merged history.
Fix phase2 merged history.