L10n:Migration
Jump to navigation
Jump to search
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