On 09/20/13 12:31 AM, Blair McBride wrote:
> Ohai!
> 
> I have numerous copies of mozilla-central (and other repos) for various
> purposes - spread around physical boxes and VMs. Some of them I use
> regularly and update regularly, others not-regularly. I've been thinking
> about the amount of time and bandwidth I waste updating them all from a
> remote server (hg.mozilla.org, github, etc). I suspect I'm not alone in
> this.
> 
> So, I was thinking of setting up a local mirror of mozilla-central (and
> other repos) - and update my development repos from the local mirror.
> Obviously, I'd like to automatically keep the mirror up to date, but
> without hammering the remote server. I was thinking regularly scheduled
> updates from the remote, as well as on-demand updates whenever I pull
> from the local mirror if the last scheduled update was greater than X
> hours ago.
> 
> Has anyone setup this type of system before? Or know of any tools that
> already handle this? It'd be nice to save some time by working from
> previous art, as well as document the process for others.
> 
> - Blair

RelEng has a tool that does something like this on our build machines,
some of us also use it locally. You can grab standalone versions for
both hg and git here:
https://github.com/mozilla/build-puppet/blob/master/modules/packages/files/hgtool.py
https://github.com/mozilla/build-puppet/blob/master/modules/packages/files/gittool.py

For hg, set HG_SHARE_BASE_DIR to something and then you can run
"hgtool.py http://repo blah" to clone. It uses "hg share" to save disk
space and time.

For git, set GIT_SHARE_BASE_DIR and does something similar.

HTH.
- Ben
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to