<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet title="XSL formatting" type="text/xsl" href="http://blog.frenchmozilla.fr/index/feed/rss2/xslt" ?><rss version="2.0"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:wfw="http://wellformedweb.org/CommentAPI/"
  xmlns:content="http://purl.org/rss/1.0/modules/content/"
  xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
  <title>Mozilla en version française - Tag - hg</title>
  <link>http://blog.frenchmozilla.fr/index/</link>
  <atom:link href="http://blog.frenchmozilla.fr/index/feed/tag/hg/rss2" rel="self" type="application/rss+xml"/>
  <description></description>
  <language>fr</language>
  <pubDate>Sun, 27 Jun 2010 13:33:22 +0200</pubDate>
  <copyright></copyright>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Dotclear</generator>
  
    
  <item>
    <title>Mercurial repository for l10n en-US files only from the frenchmozilla team</title>
    <link>http://blog.frenchmozilla.fr/index/post/2008/08/27/Mercurial-repository-for-l10n-en-US-files-only-from-the-frenchmozilla-team</link>
    <guid isPermaLink="false">urn:md5:86533fc3a8267ca0f3c5622ea84a71cd</guid>
    <pubDate>Wed, 27 Aug 2008 23:24:00 +0200</pubDate>
    <dc:creator>Philippe</dc:creator>
        <category>Général</category>
        <category>hg</category><category>l10n</category><category>mercurial</category>    
    <description>&lt;p&gt;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 &lt;code&gt;*/locales/en-US/&lt;/code&gt; files and directories. (11 Mo for the en-US files against more than 670 Mo for the whole repositories)&lt;/p&gt;



&lt;p&gt;It is accessible from &lt;a href=&quot;http://hg.frenchmozilla.fr&quot; hreflang=&quot;fr&quot;&gt;http://hg.frenchmozilla.fr&lt;/a&gt; (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).&lt;/p&gt;    &lt;p&gt;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 &lt;code&gt;*/locales/en-US/&lt;/code&gt; files and directories. (11 Mo for the en-US files against more than 670 Mo for the whole repositories)&lt;/p&gt;



&lt;p&gt;It is accessible from &lt;a href=&quot;http://hg.frenchmozilla.fr&quot; hreflang=&quot;fr&quot;&gt;http://hg.frenchmozilla.fr&lt;/a&gt; (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).&lt;/p&gt;


&lt;p&gt;Our repository watches the following directories at the moment :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;browser&lt;/li&gt;
&lt;li&gt;dom&lt;/li&gt;
&lt;li&gt;editor&lt;/li&gt;
&lt;li&gt;extensions&lt;/li&gt;
&lt;li&gt;mail&lt;/li&gt;
&lt;li&gt;netwerk&lt;/li&gt;
&lt;li&gt;other-licenses&lt;/li&gt;
&lt;li&gt;security&lt;/li&gt;
&lt;li&gt;suite&lt;/li&gt;
&lt;li&gt;toolkit&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;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 repository, it is also not in ours.&lt;/p&gt;



&lt;p&gt;You can also clone our repository if you want with :&lt;/p&gt;

&lt;pre&gt;
$ hg clone http://hg.frenchmozilla.fr/
&lt;/pre&gt;


&lt;p&gt;The only thing I'm not happy with is that the original comment of the en-US commit is not reported to the &lt;a href=&quot;http://hg.frenchmozilla.fr&quot; hreflang=&quot;fr&quot;&gt;hg.frenchmozilla.fr&lt;/a&gt; comment.
I have some hints on how to make this, but it is not yet implemented (if someone wants to help, he is welcome).&lt;/p&gt;


&lt;p&gt;&lt;br /&gt;####### Technical part, how it is done. #############&lt;/p&gt;


&lt;p&gt;Firstly, I pulled the following 4 repositories :&lt;/p&gt;

&lt;pre&gt;
$ 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/
&lt;/pre&gt;


&lt;p&gt;This gave me 4 directories.&lt;/p&gt;


&lt;p&gt;For each en-US localizable directories, I reproduced the l10n scheme in a new L10N_EN-US directory:
browser  dom  editor  extensions mail  network  other-licenses  security  suite  toolkit&lt;/p&gt;


&lt;p&gt;For instance, for the browser directory : L10N-EN-US/browser/locales/en-US/&lt;/p&gt;


&lt;p&gt;I &quot;bind&quot; mounted the en-US directories from the &lt;a href=&quot;http://hg.mozilla.org/&quot; hreflang=&quot;en&quot;&gt;hg.mozilla.org&lt;/a&gt; repositories into my new directory.
That gave me for the browser one, into the &lt;code&gt;/etc/fstab&lt;/code&gt; file (in one line):&lt;/p&gt;

&lt;pre&gt;
/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
&lt;/pre&gt;



&lt;p&gt;When all the repositories are mounted, I created our mercurial repository with the command:&lt;/p&gt;

&lt;pre&gt;
$ hg init
$ hg update
&lt;/pre&gt;


&lt;p&gt;Here is the 30 minute cron scheduled script:&lt;/p&gt;

&lt;pre&gt;
*************************************
#!/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 &amp;gt; ../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 &amp;quot;Automated commit @ $date&amp;quot;
fi

****************************************
&lt;/pre&gt;


&lt;p&gt;This script pulls the changes from the &lt;a href=&quot;http://hg.mozilla.org/&quot; hreflang=&quot;en&quot;&gt;hg.mozilla.org&lt;/a&gt; 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).&lt;/p&gt;


&lt;p&gt;The Mercurial server is then served with our local Apache server for the public.&lt;/p&gt;


&lt;p&gt;Hope this will help other localizers.&lt;/p&gt;</description>
    
    
    
      </item>
    
</channel>
</rss>