Jetpack/Integration Process: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
No edit summary
Line 45: Line 45:


Updates the Firefox and SDK files to the latest versions from the integration branch.
Updates the Firefox and SDK files to the latest versions from the integration branch.
== Checking changes ==
After updating the git and hg repositories you should add any new files from git and verify you haven't accidentally changed anything outside the add-on SDK tree. From the mozilla source directory:
hg addremove addon-sdk/source
hg status -X addon-sdk/source  # Should show no results
hg status -ur addon-sdk/source # Should show no results
hg status # Shows you all the changes you're about to land


== Testing changes ==
== Testing changes ==
Line 50: Line 59:
Before committing you can test your changes by pushing to the try server. You need to have mercurial queues enabled for this to work.
Before committing you can test your changes by pushing to the try server. You need to have mercurial queues enabled for this to work.


hg addremove addon-sdk/source
  hg qnew -f -m "<commit message>" testpatch
  hg qnew -f -m "<commit message>" testpatch


Line 61: Line 69:
Once you're done the following converts the temporary commit to a real commit that can be pushed to the project branch:
Once you're done the following converts the temporary commit to a real commit that can be pushed to the project branch:


hg qrefresh -e # Edit the commit message to remove the try: syntax
  hg qfinish -a
  hg qfinish -a


== Viewing and committing changes ==
== Viewing and committing changes ==


If you haven't done the commit by the above method then you can do it like this:
If you aren't testing the changes on try then you can just commit them:
 
hg diff
 
Shows the list of changes waiting to land in larch
 
hg addremove
hg commit -m "..."


Commits the changes
hg commit


== Pushing the changes to the project branch ==
== Pushing the changes to the project branch ==

Revision as of 17:01, 16 December 2013

This page should include instructions on updating mozilla-inbound with the latest version of the SDK code.

From Git...

Create a new version branch (do for the first uplift after mozilla-central has merged to aurora)

From your SDK repository:

# assuming you're merging the head from master:
git checkout master
git pull origin master
git checkout -b firefoxXX #where XX is the new Firefox version number on inbound
git push -u origin firefoxXX

This creates a new firefoxXX branch in git and pushes it to the upstream repository for use. This new branch will track whatever code is in the SDK's folder in mercurial.

Updating that branch

Pick up new changes from the master branch every week or as needed:

# merge master to firefoxXX directly:
git checkout master
git pull origin master
git checkout firefoxXX # XX is the current m-i version number
git merge master 
git push origin firefoxXX

From Mercurial

If you haven't checked out from mercurial before

hg clone https://hg.mozilla.org/integration/mozilla-inbound/ inbound
cd inbound/addon-sdk/source
git init
git remote add origin git@github.com:mozilla/addon-sdk.git
git fetch origin
git checkout -f firefoxXX #where XX is the current version you're uplifting to

This will give you the latest mozilla-inbound code and update the SDK files to the latest versions from the firefoxXX branch, in some cases that might be newer than those already in mozilla-inbound.

If you have previously done the above

cd inbound
hg pull -u
cd addon-sdk/source
git reset --hard firefoxXX # undoes any backouts that happened in hg, XX is current m-i version number
git pull origin firefoxXX 

Updates the Firefox and SDK files to the latest versions from the integration branch.

Checking changes

After updating the git and hg repositories you should add any new files from git and verify you haven't accidentally changed anything outside the add-on SDK tree. From the mozilla source directory:

hg addremove addon-sdk/source
hg status -X addon-sdk/source  # Should show no results
hg status -ur addon-sdk/source # Should show no results
hg status # Shows you all the changes you're about to land

Testing changes

Before committing you can test your changes by pushing to the try server. You need to have mercurial queues enabled for this to work.

hg qnew -f -m "<commit message>" testpatch

Creates a temporary commit that can be pushed to try. Include the output of TryChooser to restrict builds and tests.

hg push -f ssh://hg.mozilla.org/try/

Pushes the temporary commit to the try server, depending on your TryChooser string you should get an email telling you where to look for results.

Once you're done the following converts the temporary commit to a real commit that can be pushed to the project branch:

hg qrefresh -e # Edit the commit message to remove the try: syntax
hg qfinish -a

Viewing and committing changes

If you aren't testing the changes on try then you can just commit them:

hg commit

Pushing the changes to the project branch

hg push ssh://hg.mozilla.org/integration/mozilla-inbound/

Pushes the changes to mozilla-inbound.