[tbb-dev] Using topic branches for Tor Browser patches

Nicolas Vigier boklm at mars-attacks.org
Mon Jun 1 18:04:31 UTC 2015


On Tue, 26 May 2015, Nicolas Vigier wrote:

>    
> As an exemple, I have converted a few patches from tor-browser-31.7.0esr-4.5-1
> to this new naming in this git repository:
> https://github.com/boklm/gecko-dev/branches/all
> 
> With all topic branches merged to this tor-browser-31.7.0esr-4.5-1
> branch:
> https://github.com/boklm/gecko-dev/commits/tor-browser-31.7.0esr-4.5-1

I have converted more patches from tor-browser-31.7.0esr-4.5-1 and
submitted some of them to Mozilla Try.

I'm planning to do the same on Arthur's esr38 branch this week.

> 
> We could also have some helpers scripts to make management of all
> those branches easier:
> 
> - a script to merge / list all topic branches that have not yet been
>   merged into their tor-browser-${firefox_version}-${tbb_version}-1
>   branch.
> 
> - a script to push / list all branches that need to be pushed for a
>   firefox or tbb version to a remote git repository.
> 
> - a script to rebase all patches from a previous firefox version to a
>   new firefox version.

I started a script to help doing this, in the tbgit branch of my
tor-browser-bundle.git repo:
https://gitweb.torproject.org/user/boklm/tor-browser-bundle.git/tree/tools/tor-browser-git?h=tbgit

It has commands to merge topic branches into the main branch, pull /
push topic branches to a remote repository, and list Mozilla Try URLs
for all branches (stored using git notes).

The tbgit command can be used from a tor-browser.git directory after
adding tools/tor-browser-git to the PATH.

  $ tbgit 
  tbgit <command> [args]

  List of commands:

    help          display help informations for a command
    pull          pull topic branches from a remote repository
    push          push topic branches to a remote repository
    merge         merge topic branches into a version branch
    try-push      submit topic branches to Mozilla Try server
    try-results   display results from Mozilla Try

  $ tbgit pull --help
  tbgit pull [OPTIONS] <repository>

  Pull topic branches from a remote git repository

    Fetch a remote git repository and update local branches for a selected
    firefox and Tor Browser version. The firefox and Tor Browser versions
    are determined from the currently checked out branch.

  options:

   --yes      assume yes to all questions
   --list     don't pull anything, but list what branches should be pulled
   --no-fetch don't run git fetch before updating branches

  $ tbgit push --help
  tbgit push [OPTIONS] <repository>

  Push topic branches to a remote git repository

    Fetch a remote git repository, then push local branches that are not
    up-to-date on the remote repository, for a selected firefox and Tor
    Browser version. The firefox and Tor Browser versions are determined
    from the currently checked out branch.

  options:

   --yes      assume yes to all questions
   --list     don't push anything, but list what branches should be pushed
   --no-fetch don't run git fetch before pushing branches

  $ tbgit merge --help
  tbgit merge [OPTIONS]

  Merge topic branches into the current branch

      The current branch should be named after the firefox and Tor Browser
      versions. The program will exit if the versions cannot be determined
      from the branch name.

      If the branch cannot be merged because of a conflict, the program
      will exits so you can fix the conflict and commit.

  options:

   --yes      assume yes to all questions
   --list     don't merge anything, but list what needs to be merged
   --no-edit  don't edit merge commit messages

  $ tbgit try-push --help
  tbgit try-push [OPTIONS]

  Push topic branches to Mozilla Try server

    In the future this command will push topic branches to Mozilla Try,
    and use git-notes to store the results URL, but it is not implemented
    yet.

    Currently this command lists the branches that have not yet been
    pushed to Mozilla Try.

    The firefox and Tor Browser versions are determined from the currently
    checked out branch.

  options:

   --yes      assume yes to all questions
   --list     don't submit anything, but list what branches should be submitted

  $ tbgit try-results --help
  tbgit try-results

  Display results from Mozilla Try servers

    The firefox and Tor Browser versions are determined from the currently
    checked out branch.

    The results URLs are found using git notes from refs/notes/try-push.


Some examples using a clone of https://github.com/boklm/gecko-dev/.

Nothing to merge or push in the tor-browser-31.7.0esr-4.5-1 branch:

  $ cat .git/HEAD 
  ref: refs/heads/tor-browser-31.7.0esr-4.5-1
  $ tbgit merge --list
  $ tbgit push --list origin

Now we create a new topic branch, add a commit and use tbgit to check what
we need to merge and push:

  $ git branch 31.7.0esr/test-branch 31.7.0esr/base
  $ git checkout 31.7.0esr/test-branch
  $ echo test > test.txt
  $ git add test.txt
  $ git commit -m test
  $ git checkout tor-browser-31.7.0esr-4.5-1
  $ tbgit merge --list
  31.7.0esr/test-branch
  $ tbgit push --list origin
  31.7.0esr/test-branch (new)

The try-results command can be used to list Mozilla Try results URLs:

  $ tbgit try-results
  31.7.0esr/10819-Add-a-pref-privacy.thirdparty.isolate:
    Not submitted yet

  31.7.0esr/11641-change-TBB-directory-structure-to-be-more-like-Firefox:
    Not submitted yet

  31.7.0esr/12146-Make-the-CONNECT-Host-header-the-same-as-the-Request-URI:
    Not submitted yet

  31.7.0esr/12620-TorBrowser-regression-tests-folder:
    Will not be submitted

  31.7.0esr/13900-Remove-3rd-party-HTTP-auth-tokens:
    https://treeherder.mozilla.org/#/jobs?repo=try&revision=dde9427a5d6b

  31.7.0esr/15502-Isolate-blob-URLs-to-first-party:
    https://treeherder.mozilla.org/#/jobs?repo=try&revision=fa0d343edca8

  31.7.0esr/2176-Rebrand-Firefox-to-TorBrowser:
    https://treeherder.mozilla.org/#/jobs?repo=try&revision=0903e16cd57b

  31.7.0esr/2872-Limit-the-number-of-fonts-per-document:
    https://treeherder.mozilla.org/#/jobs?repo=try&revision=4abfb45bba86

  31.7.0esr/2874-Block-Components.interfaces-from-content:
    https://treeherder.mozilla.org/#/jobs?repo=try&revision=91cd13cf0ac7

  31.7.0esr/2875-Limit-device-and-system-specific-CSS-Media-Queries:
    https://treeherder.mozilla.org/#/jobs?repo=try&revision=32244f089736

  31.7.0esr/2949-Make-Intermediate-Cert-Store-memory-only:
    https://treeherder.mozilla.org/#/jobs?repo=try&revision=139538724d04

  31.7.0esr/2950-Make-Permissions-Manager-memory-only:
    https://treeherder.mozilla.org/#/jobs?repo=try&revision=3f8cb0c1984e

  31.7.0esr/3229-Make-content-pref-service-memory-only-clearable:
    https://treeherder.mozilla.org/#/jobs?repo=try&revision=344873ae1513

  31.7.0esr/3547-Block-all-plugins-except-flash:
    https://treeherder.mozilla.org/#/jobs?repo=try&revision=c75fb4685994

  31.7.0esr/3875-Use-Optimistic-Data-SOCKS-variant:
    https://treeherder.mozilla.org/#/jobs?repo=try&revision=b22d40acd7d8

  31.7.0esr/4755-Return-client-window-coordinates-for-mouse-event-screenX-Y:
    https://treeherder.mozilla.org/#/jobs?repo=try&revision=588ef3e16aca

  31.7.0esr/5282-Randomize-HTTP-request-order-and-pipeline-depth:
    Not submitted yet

  31.7.0esr/5715-Make-nsICacheService.EvictEntries-synchronous:
    https://treeherder.mozilla.org/#/jobs?repo=try&revision=4347c535ef41

  31.7.0esr/5741-Prevent-WebSocket-DNS-leak:
    https://treeherder.mozilla.org/#/jobs?repo=try&revision=155752f22aa0

  31.7.0esr/5742-API-allows-you-to-get-the-url-bar-URI-for-a-channel-or-nsIDocument:
    https://treeherder.mozilla.org/#/jobs?repo=try&revision=7334c7aafc24

  31.7.0esr/5856-Do-not-expose-physical-screen-info-via-window-window.screen:
    https://treeherder.mozilla.org/#/jobs?repo=try&revision=875cbad7b056

  31.7.0esr/6253-Add-canvas-image-extraction-prompt:
    https://treeherder.mozilla.org/#/jobs?repo=try&revision=1dc12a786a61

  31.7.0esr/6539-Isolate-the-Image-Cache-per-url-bar-domain:
    https://treeherder.mozilla.org/#/jobs?repo=try&revision=0e2601a370f6

  31.7.0esr/6564-Isolate-DOM-storage-to-first-party-URI:
    https://treeherder.mozilla.org/#/jobs?repo=try&revision=9fb0ae49608b

  31.7.0esr/6786-Do-not-expose-system-colors-to-CSS-or-canvas:
    https://treeherder.mozilla.org/#/jobs?repo=try&revision=6a15e63167d5

  31.7.0esr/8312-Remove-This-plugin-is-disabled-barrier:
    https://treeherder.mozilla.org/#/jobs?repo=try&revision=17f9a6c28f68

  31.7.0esr/9173-Change-the-default-Firefox-profile-directory-to-be-TBB-relative:
    Not submitted yet

  31.7.0esr/9701-Prevent-ClipBoardCache-from-writing-to-disk:
    Not submitted yet

  31.7.0esr/9837-Disable-uninstall-helper.exe-on-Win32:
    Will not be submitted

  31.7.0esr/Omnibox-Add-DDG-Startpage-Disconnect-Youtube-Twitter-remove-Amazon-eBay-bing:
    Not submitted yet

  31.7.0esr/TB2-Provide-an-observer-event-to-close-persistent-connections:
    https://treeherder.mozilla.org/#/jobs?repo=try&revision=93af45d5111a

  31.7.0esr/base:
    https://treeherder.mozilla.org/#/jobs?repo=try&revision=5bbe47119ac0

  31.7.0esr/enable-browser.ini:
    Will not be submitted

  31.7.0esr/enable-mochitest.ini:
    Will not be submitted

  31.7.0esr/mingw-fixes:
    Not submitted yet

  31.7.0esr/mozconfigs:
    Will not be submitted

  31.7.0esr/preference-overrides:
    Not submitted yet

  31.7.0esr/test-branch:
    Not submitted yet

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.torproject.org/pipermail/tbb-dev/attachments/20150601/1ee0ce5e/attachment.sig>


More information about the tbb-dev mailing list