Mozilla stuff



Gaia Performance tests: Eli Perelman

2014-12-31 My branches.




List all the files for a commit in Git

git show hash_id git diff-tree --no-commit-id --name-only -r hash_id


Make a diff of git new and untracked files

make a diff of git new and untracked files: git diff --no-index /dev/null filename


Gaia Python Functional Integration Tests = gaia-ui tests

Gaia Python Functional Integration Tests = gaia-ui tests
== Gip on treeherder

git checkout -b new_branch from inside other branch

Note to self, when you do git checkout -b new_branch on an old_branch, you are continuing form that old_branch.
So better to start from master, unless you really know what you are doing.


Squashing commits in github


Useful links from Richard using github

Marionette client API documentation

Gaia-UI test API documentation

Submitting a Gaia patch

to update your local repository: git pull --rebase upstream master

git pull --rebase upstream master

to get a clean and updated virtualenv for gaia-ui-test

virtualenv new_env
python develop in gaia-ui-test


Some git commands

To see all availabe branches (similar to available mercurial queues): git branch
To make a new branch: git branch branch_name
To go to a specific branch: git checkout branch_name

To add changes to a github pull request:
git add . (git add --all also removes entries when there are removed files)
git commit -m "your commit message"
git push branch_name

To see changed files between master and your branch:
git diff --name-status master..branch_name

To remove file from git: git rm file_name

How to prevent pushing changes to master (at least without warning):
git config push.default nothing


update master

git fetch upstream
git merge upstream/master

Git vs Mercurial

Git Mercurial
git pull hg pull -u
git fetch hg pull
git reset --hard hg update -C
git revert hg backout
git add hg add (Only equivalent when is not tracked.)
git add Not necessary in Mercurial.
git reset Not necessary in Mercurial.
git add -i hg record
git commit -a hg commit
git commit --amend hg commit --amend
git blame hg blame or hg annotate
git blame -C (closest equivalent): hg grep --all
git bisect hg bisect
git rebase --interactive hg histedit (Requires the HisteditExtension.)
git stash hg shelve (Requires the ShelveExtension or the AtticExtension.)
git merge hg merge
git cherry-pick hg graft
git rebase hg rebase -d (Requires the RebaseExtension.)
git format-patch and git send-mail hg email -r (Requires the PatchbombExtension.)
git am hg mimport -m (Requires the MboxExtension and the MqExtension. Imports patches to mq.)
git checkout HEAD hg update
git log -n hg log --limit n
git push hg push

How to create a patch from a github pull request


Local content over local web server

Local content over local web server:
search = Search(self.marionette)


Git regarding forking a repo


adb shell
stop b2g
cd /data/b2g/mozilla/*.default/
echo 'user_pref("services.mobileid.loglevel", "Debug"); user_pref("services.hawk.loglevel", "Debug"); user_pref("services.hawk.log.sensitive", true);' >> prefs.js
start b2g


PAC file = Proxy auto-config file

.bashrc edit on the emulator to find ssltunnel

Because of bug 1002545 :
You need to build your own Firefox desktop build to get an ssltunnel version
That's why you need to edit .bashrc on the b2g emulator:

Mtbf = mean time between failures


Working b2g emulator

To get working b2g emulator:
- Use Ubuntu14 VMWare image, 60GB storage, 4GB memory
- Follow
 - Build mozilla-central firefox also on it (see bug 1002545):
# hg clone
# cd mozilla-central
# ./mach bootstrap
# ./mach build
# export XULRUNNER_DIRECTORY=$PWD/obj-x86_64-unknown-linux-gnu/dist
Then go to B2G folder and run ./mach mochitest-remote 


Loop Client testing

Between FirefoxOS Phone (Flame) and Firefox Nightly desktop

  1. In terminal: git clone
  2. Follow instructions at:
  3. Add the packaged app firefoxos-loop-client
  4. Make a call on the firefoxos-loop client
  5. Open Firefox Nightly on desktop, open the url that was shared with the firefoxos-loop-client app url.