L10n:Migration: Difference between revisions
(→Merge) |
(→Merge) |
||
Line 83: | Line 83: | ||
hg --cwd mozilla-aurora/$loc rm browser/searchplugins/list.txt | hg --cwd mozilla-aurora/$loc rm browser/searchplugins/list.txt | ||
hg --cwd mozilla-aurora/$loc ci -m 'Bug 1276739 - Switch search to use a JSON based format' | hg --cwd mozilla-aurora/$loc ci -m 'Bug 1276739 - Switch search to use a JSON based format' | ||
hg --cwd mozilla-aurora/$loc rm browser/searchplugins | |||
hg --cwd mozilla-aurora/$loc ci -m 'Bug 1276740 - Centralize all search plugins into mozilla-central' | |||
hg --cwd mozilla-aurora/$loc rm mail/searchplugins/list.txt | hg --cwd mozilla-aurora/$loc rm mail/searchplugins/list.txt | ||
hg --cwd mozilla-aurora/$loc ci -m 'Bug 1300199 - Switch search to use a JSON based format' | hg --cwd mozilla-aurora/$loc ci -m 'Bug 1300199 - Switch search to use a JSON based format' |
Revision as of 10:02, 1 November 2016
Preparations
mkdir releases && cd releases mkdir -p l10n/mozilla-aurora mkdir -p l10n/mozilla-beta export LOCS=`wget -qO- 'https://hg.mozilla.org/releases/l10n/mozilla-beta/?style=raw' | grep -v x-testing | awk -F/ '{print $5;}'`
Put this script (upclones.sh) in your $PATH:
#!/bin/bash HERE=`pwd` for channel in aurora beta; do for loc in $LOCS; do CLONE="$HERE/mozilla-$channel/$loc" if [[ -d $CLONE/.hg ]]; then hg -R $CLONE pull -u -r default else hg clone -r default https://hg.mozilla.org/releases/l10n/mozilla-$channel/$loc $CLONE fi done done
Then, enable Axel's merge helper extension to hg:
hg clone https://hg.mozilla.org/users/axel_mozilla.com/branch-l10n/ ~/src/branch-l10n
Edit your ~/.hgrc accordingly:
[extensions] ... merge-l10n = ~/src/branch-l10n/merge_l10n.py
Try it out with:
hg help no-op-merge
There's also a test-suite in branch-l10n, which you can run to verify your version of mercurial works.
cd ~/src/branch-l10n/ python test.py
If the extension works, you can proceed with the merge
Merge
Have LOCS set. Also, make sure ssh works for hg, we're pulling over https to speed things up.
The actual merge wants to happen closely to/after the en-US merge and its push to beta.
First, visit the l10n dashboard, and migrate the database. Adjust the time to just before the push to beta of en-US. Or either, if aurora at one point was pushed first. The page is https://l10n.mozilla.org/shipping/release/. Also, on that page, switch off `fallback` for Lightning.
cd releases/l10n function isCentralLocale () { central_locales=(eo es-ES fr it pl ru) for locale in ${central_locales[@]}; do if [[ $locale == $1 ]]; then return 1 fi done return 0 } # Path to migration script, without trailing slash (removed if present) # Use $HOME instead of ~ if needed migration_path="$HOME/mozilla-central/python/devtools/migrate-l10n/migrate" migration_path=${migration_path%/} for loc in $LOCS; do hg -R mozilla-beta/$loc pull -u -r default hg -R mozilla-aurora/$loc pull -u -r default hg -R mozilla-beta/$loc no-op-merge -m"Migrating aurora to beta for Firefox 51" $PWD/mozilla-aurora/$loc hg -R mozilla-beta/$loc push -r default ssh://hg.mozilla.org/releases/l10n/mozilla-beta/$loc hg -R mozilla-aurora/$loc pull -u -r default mozilla-beta/$loc # Specific for 52 on aurora: hg --cwd mozilla-aurora/$loc rm browser/searchplugins/list.txt hg --cwd mozilla-aurora/$loc ci -m 'Bug 1276739 - Switch search to use a JSON based format' hg --cwd mozilla-aurora/$loc rm browser/searchplugins hg --cwd mozilla-aurora/$loc ci -m 'Bug 1276740 - Centralize all search plugins into mozilla-central' hg --cwd mozilla-aurora/$loc rm mail/searchplugins/list.txt hg --cwd mozilla-aurora/$loc ci -m 'Bug 1300199 - Switch search to use a JSON based format' hg --cwd mozilla-aurora/$loc rm devtools/client/promisedebugger.dtd hg --cwd mozilla-aurora/$loc ci -m 'Bug 1311506 - Remove promise debugger' # Migrate devtools strings https://bugzilla.mozilla.org/show_bug.cgi?id=1294186 isCentralLocale $loc if [ $? -eq 1 ] ; then # Ignore locales working on mozilla-central continue else python ${migration_path}/main.py mozilla-aurora/$loc -c ${migration_path}/conf/bug1294186 hg --cwd mozilla-aurora/$loc rm devtools/client/font-inspector.dtd hg --cwd mozilla-aurora/$loc rm devtools/client/inspector.dtd hg --cwd mozilla-aurora/$loc rm devtools/client/layoutview.dtd hg --cwd mozilla-aurora/$loc rm devtools/client/styleinspector.dtd hg --cwd mozilla-aurora/$loc add devtools/client/boxmodel.properties hg --cwd mozilla-aurora/$loc add devtools/client/font-inspector.properties hg --cwd mozilla-aurora/$loc add devtools/client/inspector.properties hg --cwd mozilla-aurora/$loc add devtools/client/styleinspector.properties hg --cwd mozilla-aurora/$loc ci -m 'Bug 1294186 - Migrate inspector.xul from .dtd to .properties' python ${migration_path}/main.py mozilla-aurora/$loc -c ${migration_path}/conf/bug1308500_1309191 hg --cwd mozilla-aurora/$loc rm devtools/client/netmonitor.dtd hg --cwd mozilla-aurora/$loc add devtools/client/netmonitor.properties hg --cwd mozilla-aurora/$loc ci -m 'Bug 1308500, Bug 1309191 - Migrate NetMonitor from .dtd to .properties' fi # Push to aurora hg --cwd mozilla-aurora/$loc push -r default ssh://hg.mozilla.org/releases/l10n/mozilla-aurora/$loc done
This goes through all locales, does a final pull, does the no-op-merge, and pushes to aurora, and then beta. That way, you minimize the time when commits can create heads.