L10n:Migration: Difference between revisions
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
== | == Preparations == | ||
mkdir releases && cd releases | mkdir releases && cd releases | ||
Line 12: | Line 12: | ||
HERE=`pwd` | HERE=`pwd` | ||
for loc in $LOCS; do | 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 ssh://hg.mozilla.org/releases/l10n/mozilla-$channel/$loc $CLONE | |||
fi | |||
done | |||
done | done | ||
</nowiki></pre> | </nowiki></pre> |
Revision as of 09:52, 9 May 2015
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 ssh://hg.mozilla.org/releases/l10n/mozilla-$channel/$loc $CLONE fi done done
Merge
First, enable Axel's merge helper extension to hg:
hg clone http://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
If it shows the help screen, you can proceed with the merge
cd releases/ for loc in `cat mozilla-*a/browser/locales/shipped-locales|awk '{print $1;}'|sort|uniq|grep -v en-US`; do hg -R l10n/mozilla-beta/$loc no-op-merge -m"Migrating aurora to beta for Firefox XXX" $PWD/l10n/mozilla-aurora/$loc; done
Push
Once the source migration is complete, push the merged repos back to h.m.o.
cd releases/
for loc in `ls -1`; do hg -R $loc push -f; done