Compatibility/Mobile/WipeOutUAOverides: Difference between revisions

Jump to navigation Jump to search
→‎Updating the UA override list: Process for updating the UA override list with hg
(→‎Updating the UA override list: Process for updating the UA override list with hg)
Line 69: Line 69:


==Updating the UA override list==
==Updating the UA override list==
Once a bug has been resolved it is necessary to update the [https://github.com/mozilla-b2g/gaia/blob/master/build/ua-override-prefs.js ua-override list] on the gaia project. It is possible to make one pull request for a few ua strings override at the same time.
 
Since the end of 2013, the UA override list is managed dynamically on the server side. @@Insert here the relevant bugs and documentation@@
 
Once a bug has been resolved it is necessary to update the [https://hg.mozilla.org/mozilla-central/file/tip/b2g/app/ua-update.json.in ua-override list] on the Mozilla Central. It is possible to make one pull request for a few ua strings override at the same time.


For the following instructions, you are expected to have  
For the following instructions, you are expected to have  


# A [https://github.com/ github] account
# A working knowledge of hg
# A working knowledge of git
# A [https://bugzilla.mozilla.org/ Mozilla bugzilla] account
# A [https://bugzilla.mozilla.org/ Mozilla bugzilla] account




These steps are done once and for all.
=== Preparation ===


# Go to [https://github.com/mozilla-b2g/gaia/ Gaia project] on github.
# [https://developer.mozilla.org/en-US/docs/Installing_Mercurial Install Mercurial] (10 minutes)
# Fork it  <br/><code>https://github.com/{your_account}/gaia/</code>
# [https://developer.mozilla.org/en-US/docs/Developer_Guide/Source_Code/Mercurial Get Mozilla Source Code Using Mercurial] with <code>hg clone https://hg.mozilla.org/mozilla-central/ mozilla-central</code> (A lot of times: 2.3 Go to transfer)
# Clone the project locally on your computer. It will be long. it's >300Mo<br/> <code>git clone https://github.com/{your_account}/gaia/<br/>cd gaia</code>
# If it's your first time with Mercurial: <code>./mach mercurial-setup</code> will save you a lot of time for configuration and be ready to work with Mozilla environment.
# Add the project as an upstream to help you keep in sync.<br/> <code>git remote add upstream https://github.com/mozilla-b2g/gaia.git</code>


Each time you have to modify the list :)
=== Updating the UA override list ===


# Synchronize your repo with the mother repo<br/> <code>git fetch upstream</code>
# <code>cd /your/path/mozilla-central</code>
# Modify the <code>gaia/blob/master/build/ua-override-prefs.js</code>
# <code>hg status</code>
# Do a commit for the modification<br/> <code>commit -m "bug_number - bug label" ua-override-prefs.js</code>
# <code>hg qpop -a</code>
# You can create a diff file for a patch if you want. Not mandatory.<br/> <code>git diff -U8 > ~/ua-override-prefs-YYYYMMDD.patch</code> you might want to add it to the bug you will create later on.
# <code>hg pull -u</code>
# [https://bugzilla.mozilla.org/enter_bug.cgi?product=Boot2Gecko Create a new bug] in bugzilla with the title "Remove UA override for example.org". Replace example.org by the domain or list of domains.  
# <code>cd b2g/app</code>
# Product: Boot2Gecko, Component: Gaia, Platform: ARM, Gonk (Firefox OS)
# Check the Remove UA override bug, you are working with to find the list of domains to remove.
# Add the Patch as an attachment.
# Edit the UA override <code>ua-update.json.in</code>
# One finished, push your modification to your github repo.<br/> <code>git push</code>
# Be sure that all the domains you are removing are actually closed bugs on the bug dependency list.
# Create a pull request in your github repo for the gaia project with your modifications. Important: Pull request syntax title is precise <code>Bug bug_number - Remove UA override for [list of domains]</code> The bug_number is the one given by bugzilla you just created. It needs to start by Bug.
# Create a new patch. For example: <code>hg qnew ua-override-bug965060.patch</code>
# Add a comment on the bugzilla with the link to the new created Pull Request.
# Add as an attachment the patch to the bug (for example Bug 965060)
# Ask for review in bugzilla and put lmandel for reviewer with a "?"
# Ask for review of your code <code>r? lmandel</code>
# When review is done, adding the checkin-needed keyword on the bugzilla
# Once the patch got a <code>r+</code>, add the keyword <code>checkin-needed</code>
# Add a dependency on bug 890004
# Once it is in. The committer will close the bug.


==References==
==References==
Confirmed users
1,567

edits

Navigation menu