Hello Nicolas,

On Thu, 2 Jun 2011 23:04:42 +0200
"Dechesne, Nicolas" <n-deche...@ti.com> wrote:

> Paul
> 
> On Thu, Jun 2, 2011 at 9:24 AM, Paul Sokolovsky
> <paul.sokolov...@linaro.org>wrote:
> 
> >
> > This is even more interesting, with Google people confirming that
> > repo --mirror works within some bounds and limitations:
> >
> >
> > http://groups.google.com/group/repo-discuss/browse_thread/thread/401656c3ad0a4a0c
> >
[]

> 
> I have spent some time in the past with repo --mirror (we have
> internal mirrors within TI). After several attempts my conclusion was
> that it was not the best approach. the main problem is that repo
> --mirror expects that you give a manifest tree. If you have several
> branches in your manifest tree (like it's the case for the
> omapmanifest on git.omapzoom.org), repo sync will only sync the
> branch you've used initially. So if you have new or different trees
> on other branches they aren't sync'd. that pretty much means that you
> need 1 mirror for each manifest branch. (in fact I am the one that
> asked the repo --mirror question you've found!)

But, as far as I understood from the mailing list thread above, it's
possible for one mirror to contain different manifest branches, one
just need to sync them explicitly (unlike one would think mirror would
do). (That's what we do now, I just want to be sure we won't any
additional surprises soon.)

> 
> so i ended it doing a git mirror, and I wrote this simple helper
> script https://github.com/ndechesne/git-mirror which can be used to
> mirror a complete 'git server' using gitweb. for example, you just
> need to add this in a cron:
> 
> git-mirror -o /data/git/repositories/ -s http://git.omapzoom.org -g
> git:// git.omapzoom.org

Thanks, this looks interesting.

> 
> and the script will mirror the server locally. everytime it runs:
> - it creates new trees that have appeared on the remote
> - updates all existing trees
> - removed trees that have disappeared from the remote.
> 
> i have been using this script on several mirror (1 at every site)
> quite reliably for ~2 years. prior to that I was using repo sync and
> frequently had failures...

Nice, thanks much for sharing the experience! We'd probably still want
to use manifest as the source for what to mirror (that's the only
thing that our mirror service takes as input actually), but it's great
to know that using git clone --mirror works well with repo and actually
improves reliability.


> 
> hope this helps.

--
Best regards,
Paul

_______________________________________________
linaro-dev mailing list
linaro-dev@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-dev

Reply via email to