NOTE: All examples in this template reference the rebase from 102.7.0esr to 102.8.0esr
Explanation of Variables
$(ESR_VERSION): the Mozilla defined ESR version, used in various places for building tor-browser tags, labels, etc
Example: 102.8.0
$(ESR_TAG): the Mozilla defined hg (Mercurial) tag associated with $(ESR_VERSION)
Example: FIREFOX_102_8_0esr_RELEASE
$(ESR_TAG_PREV): the Mozilla defined hg (Mercurial) tag associated with the previous ESR version when rebasing (ie, the ESR version we are rebasing from)
Example: FIREFOX_102_7_0esr_BUILD1
$(BROWSER_MAJOR): the browser major version
Example: 12
$(BROWSER_MINOR): the browser minor version
Example: either 0 or 5; Alpha's is always (Stable + 5) % 10
$(BASE_BROWSER_BRANCH): the full name of the current base-browser branch
Example: base-browser-102.8.0esr-12.5-1
$(BASE_BROWSER_BRANCH_PREV): the full name of the previous base-browser branch
Example: base-browser-102.7.0esr-12.5-1
$(TOR_BROWSER_BRANCH): the full name of the current tor-browser branch
Example: tor-browser-102.8.0esr-12.5-1
$(TOR_BROWSER_BRANCH_PREV): the full name of the previous tor-browser branch
Example: tor-browser-102.7.0esr-12.5-1
NOTE: It is assumed that we've already identified the new ESR branch during the tor-browser stable rebase
Bookkeeping
Link this issue to the appropriate Release Prep issue.
Example (if separate base-browser rebase was skipped): git cherry-pick FIREFOX_102_7_0esr_BUILD1..tor-browser-102.7.0esr-12.5-1-build1
Rebase and autosquash ONLY these newly cherry-picked commits using the commit noted previously: git rebase --autosquash --interactive $(PREV_HEAD)
Example: git rebase --autosquash --interactive FIREFOX_102_8_0esr_RELEASE
(Optional) Patch reordering
NOTE: We typically want to do this after new features or bug fix commits which are not !fixups to an existing commit have been merged and are just sitting at the end of the commit history
Relocate new base-browser patches in the patch-set to enforce this rough thematic ordering:
MOZILLA BACKPORTS - official Firefox patches we have backported to our ESR branch: Android-specific security updates, critical bug fixes, worthwhile features, etc
MOZILLA REVERTS - revert commits of official Firefox patches
UPLIFT CANDIDATES - patches which stand on their own and should be uplifted to mozilla-central
Rebase and autosquash again, this time replacing all fixup and squash commands with pick. The goal here is to have all of the fixup and squash commits beside the commit which they modify, but kept un-squashed for easy debugging/bisecting.
Example: git rebase --autosquash --interactive FIREFOX_102_8_0esr_RELEASE
Compare patch sets to ensure nothing weird happened during conflict resolution:
diff of diffs:
Do the diff between current_patchset.diff and rebased_patchset.diff with your preferred difftool and look at differences on lines that starts with + or -
diff current_patchset.diff and rebased_patchset.diff
If everything went correctly, the only lines which should differ should be the lines starting with index abc123...def456 (unless the previous base-browser branch includes changes not included in the previous tor-browser branch)