Starting from the move to Mercurial, it's not possible to pull from the
repository only the en-US files.
With the help of the bind mount we have successfully made an hg
repository with only the needed */locales/en-US/ files and directories.
(11Mo for the en-US files against more than 670Mo for the whole
repositories)
It is accessible from http://hg.frenchmozilla.fr (DNS servers may not be
updated yet from your location).
The en-US repositories are updated each 30 minutes and if the changes
include en-US ones, they are synchronized in our repository (feeds are
up-to-date).
Our repository watches the following directories at the moment :
browser
dom
editor
extensions
mail
netwerk
other-licenses
security
suite
toolkit
The mozilla-central, comm-central, and dom-inspector are included
(mobile-browser is on its way).
Note that since venkman and irc are not (yet ?) directly on the
mozilla-central repo, it is also not in ours.
You can also clone our repository if you want with :
hg clone http://hg.frenchmozilla.fr/
The only thing I'm not happy with is that the original comment of the
en-US commit is not reported to the hg.frenchmozilla.fr comment.
I have some hints on how to make this, but it is not yet implemented (if
someone wants to help, he is welcome).
Hope this will help other localisers.
Philippe from the Frenchmozilla team.
####### Technical part, how it is done. #############
Firstly, I pulled the following 4 repositories :
hg clone http://hg.mozilla.org/comm-central/
hg clone http://hg.mozilla.org/mozilla-central/
hg clone http://hg.mozilla.org/mobile-browser/
hg clone http://hg.mozilla.org/dom-inspector/
This gave me 4 directories.
For each en-US localizable directories, I reproduced the l10n scheme in
a new L10N_EN-US directory:
browser dom editor extensions mail netwerk other-licenses security
suite toolkit
For instance, for the browser directory : L10N-EN-US/browser/locales/en-US/
I "bind" mounted the en-US directories from the hg.mozilla.org
repositories into my new directory.
That gave me for the browser one, into the /etc/fstab file (in one line):
"
/srv/d_frmoz/DONNEES/HG/mozilla-central/browser/locales/en-US
/srv/d_frmoz/DONNEES/HG/L10N-EN-US/browser/locales/en-US none
defaults,bind 0 0
"
When all the repositories are mounted, I created our mercurial
repository with the command:
hg init
hg update
Here is the 30 minute cron scheduled script:
*************************************
#!/bin/bash
cd /srv/d_frmoz/DONNEES/HG/comm-central/
hg pull -u
cd /srv/d_frmoz/DONNEES/HG/mozilla-central/
hg pull -u
cd /srv/d_frmoz/DONNEES/HG/mobile-browser/
hg pull -u
cd /srv/d_frmoz/DONNEES/HG/dom-inspector/
hg pull -u
cd /srv/d_frmoz/DONNEES/HG/L10N-EN-US/
hg addremove
hg diff > ../diff.tmp
if [ -s ../diff.tmp ]; then
date=`date`
suffix=$(date +%s)
cp ../diff.tmp ../DIFF/diff_$suffix.txt
rm -f ../diff.tmp
hg commit -m "Automated commit @ $date"
fi
****************************************
This script pulls the changes from the hg.mozilla.org repositories and
if there is a change in the en-US part, it commits it to our repository
with a comment where the date is included (I need to find a way with hg
log to put the original comment also).
The Mercurial server is then served with our local Apache server for the
public.
Hope this will help other localisers.
This is also available in our blog post :
http://blog.frenchmozilla.fr/index/post/2008/08/27/Mercurial-repository-for-l10n-en-US-files-only-from-the-frenchmozilla-team
Philippe from the Frenchmozilla team.
I will try this myself and using symlinks to have a clean MT
workspace ;)
Thanks for all!
Beware that mercurial doesn't like symlinks for directories.
Ph
No, they are not for hg.
They are for using with MT, symlinking (does this word exist?) for
having the old structure.
Anyway, thanks for the point ;)
Because it is used by compare-locales and would be nice if it's there.
Thanks!
Note, the l10n.ini files in comm-central probably break in Phillipe's
repo, as the relative paths are different, AFAICT.
Same might go for configure, if you'd want to use that repo for building
test versions of your localization.
Axel
I hope that I will be able to work on the commit comment issue this week.
Ph