Sheriffing/How To/Merges

From MozillaWiki
< Sheriffing
Revision as of 06:53, 19 April 2017 by Tomcat (talk | contribs)
Jump to navigation Jump to search

Merges:

Goal: Merging around twice a day to/from autoland and mozilla-inbound to mozilla-central

Merges from the integration trees to mozilla-central are done on green PGO runs to avoid bustages on PGO which could affect as example Nightly Builds


Step 1

Merging from autoland and mozilla-inbound to mozilla-central

Example mozilla-inbound to mozilla-central merge

-> cd into your mozilla-central directory
-> hg pull ssh://hg.mozilla.org/integration/mozilla-inbound -r (the green with PGO runs inbound revision changeset) - also make sure there are no backouts  after that etc
-> hg merge && hg commit -m "merge inbound to mozilla-central"
-> push

don't forget to use Bugherder after that! It's available from the menu for the push on Treeherder

Step 2

Merging back from mozilla-central to autoland and mozilla-inbound

Example mozilla-central to mozilla-inbound merge

-> go to your mozilla-inbound tree directory
-> hg pull && hg update to make sure its the latest
-> hg pull ssh://hg.mozilla.org/mozilla-central/
-> hg merge
-> hg commit -m "merge mozilla-central to mozilla-inbound"
-> hg push
since this above might result in race conditions on the tree 

(when its busy there) this works better ->

go to your mozilla-inbound tree
hg pull && hg update && hg pull ssh://hg.mozilla.org/mozilla-central/ && hg merge && hg commit -m  "Merge mozilla-central to [TREENAME]" &&  hg push 

Aliases for the various repositories make the above easier to type!

Step 3 hg update when there is nothing to merge

You get the run 'hg update' to get a working copy information, because there where no changes on m-c and so nothing to merge. The workflow for this case is:

1.) Run hg update -- If unsure if everything is ok just do a hg out, that should list all the changesets you want to sync to m-c

2.) because you do no merge and so have no commits like "merge a to b a=me" you would run into a hg hook telling you that the m-c repo is set to approval-only - so you need to temporary need to set the mozilla-central tree to "open" via tree-status to be able to push

3.) Push your changes from Step 1

4.) Set the m-c tree back to approval-required. This is important because if we miss this, we risk unexpected pushes to mozilla-central since some people might think the open tree is intentional :)

5.) Use Bugherder to mark the bugs as usual

6.) now when you do the Steps from Step 1 with mozilla-inbound you get the note that you need to merge.