Merging TraceMonkey Repo

  • Revision slug: SpiderMonkey/Merging_TraceMonkey_Repo
  • Revision title: Merging TraceMonkey Repo
  • Revision id: 78198
  • Created:
  • Creator: edmorley
  • Is current revision? Yes
  • Comment 3 words added

Revision Content

These are the steps to merge the TraceMonkey repository to mozilla-central. Between resolving conflicts, finding a good time to land, watching the tree, and marking bugs as fixed, it takes around half a day.

  • Let the mozilla-central sheriff know that you intend to perform a tracemonkey merge to mozilla-central.
  • Checkout repos.
  • Pull mozilla-central into tracemonkey via hg pull ../mozilla-central
    • You will see a notice about adding at least one head to the repository -- this is the mozilla-central head that you are about to merge.
  • Merge via hg merge
    • You may see a number of conflicts. Conflicting files can be listed via hg resolve -l. Exercise caution, because leaving off the -l will re-merge and lose all of the resolutions you've already performed.
    • For each unresolved file (with a U next to it), open the file and find the conflict markers that look like <<<<<<.
    • If it's obvious how to fix the conflict, just do it. Otherwise, you can run hg parents filename to find the changesets which may have contributed to the conflict.
      • Inspecting the files at those two changesets can be helpful: hg cat -c changeset filename
    • Once all the conflict markers are removed, you've performed the manual resolution, which you tell to mercurial by running hg resolve -m filename. Again, exercuse caution.
    • Once you've resolved all the files, all the entries in hg resolve -l will have Rs next to them.
  • Perform a build.
    • If the tree does not build successfully you've likely merged something incorrectly. Historically, auto-merge doesn't mess up much.
  • Land.
  • Mark Bugzilla bugs as fixed.
    • Once you've pushed to mozilla-central, do a Bugzilla search for bugs that are not marked as RESOLVED but have fixed-in-tracemonkey in the whiteboard.
    • For each bug in the results, find the corresponding changesets that we just merged (i.e. from the TBPL changeset display) and paste the link into the comment field while resolving as fixed.
  • If something goes wrong!?
    • There's no cookie cutter way to handle it. You can't really back out a merge easily, so rambo-ing a fix or figuring out how to back out an offending changeset is the only way it has been resolved historically.

Revision Source

<p>These are the steps to merge the TraceMonkey repository to mozilla-central. Between resolving conflicts, finding a good time to land, watching the tree, and marking bugs as fixed, it takes around half a day.</p>
<ul> <li>Let the mozilla-central sheriff know that you intend to perform a tracemonkey merge to mozilla-central.</li> <li>Checkout repos. <ul> <li>hg clone <a class=" external" href="ssh://hg.mozilla.org/mozilla-central" rel="freelink">ssh://hg.mozilla.org/mozilla-central</a> <span style="font-family: Courier New;">mozilla-central</span></li> <li>hg clone <a class=" external" href="ssh://hg.mozilla.org/tracemonkey" rel="freelink">ssh://hg.mozilla.org/tracemonkey</a> tm-merge</li> <li><span style="font-family: Courier New;">cd tm-merge</span></li> </ul> </li> <li>Pull mozilla-central into tracemonkey via <span style="font-family: Courier New;">hg pull ../mozilla-central</span> <ul> <li>You will see a notice about adding at least one head to the repository -- this is the mozilla-central head that you are about to merge.</li> </ul> </li> <li>Merge via <span style="font-family: Courier New;">hg merge</span> <ul> <li>You may see a number of conflicts. Conflicting files can be listed via <span style="font-family: Courier New;">hg resolve -l</span>. <strong>Exercise caution</strong>, because leaving off the <span style="font-family: Courier New;">-l</span> will re-merge and lose all of the resolutions you've already performed.</li> <li>For each unresolved file (with a <span style="font-family: Courier New;">U</span> next to it), open the file and find the conflict markers that look like <span style="font-family: Courier New;">&lt;&lt;&lt;&lt;&lt;&lt;</span>.</li> <li>If it's obvious how to fix the conflict, just do it. Otherwise, you can run <span style="font-family: Courier New;">hg parents filename</span> to find the changesets which may have contributed to the conflict. <ul> <li>Inspecting the files at those two changesets can be helpful: <span style="font-family: Courier New;">hg cat -c changeset filename</span></li> </ul> </li> <li>Once all the conflict markers are removed, you've performed the manual resolution, which you tell to mercurial by running <span style="font-family: Courier New;">hg resolve -m filename</span>. Again, exercuse caution.</li> <li>Once you've resolved all the files, all the entries in <span style="font-family: Courier New;">hg resolve -l</span> will have <span style="font-family: Courier New;">R</span>s next to them.</li> </ul> </li> <li>Perform a build. <ul> <li>If the tree does not build successfully you've likely merged something incorrectly. Historically, auto-merge doesn't mess up much.</li> </ul> </li> <li>Land. <ul> <li>If the sheriff gives you permission to land, <span style="font-family: Courier New;">hg push -r default <a class=" external" href="ssh://hg.mozilla.org/tracemonkey" rel="freelink">ssh://hg.mozilla.org/tracemonkey</a></span> and <span style="font-family: Courier New;">hg push <a class=" external" href="ssh://hg.mozilla.org/mozilla-central" rel="freelink">ssh://hg.mozilla.org/mozilla-central</a></span></li> <li>If you can't push to mozilla-central because somebody ignored the "ask the sheriff" rule and pushed there anyway, that's typical, and it just means you have to repeat the above process.</li> </ul> </li> <li>Mark Bugzilla bugs as fixed. <ul> <li>Once you've pushed to mozilla-central, do a Bugzilla search for bugs that are not marked as <span style="font-family: Courier New;">RESOLVED</span> but have <span style="font-family: Courier New;">fixed-in-tracemonkey</span> in the whiteboard.</li> <li>For each bug in the results, find the corresponding changesets that we just merged (i.e. from the TBPL changeset display) and paste the link into the comment field while resolving as fixed.</li> </ul> </li> <li>If something goes wrong!? <ul> <li>There's no cookie cutter way to handle it. You can't really back out a merge easily, so rambo-ing a fix or figuring out how to back out an offending changeset is the only way it has been resolved historically.</li> </ul> </li>
</ul>
Revert to this revision