[Systems] need help synchronizing git.olenepal.org with git.sugarlabs.org
Bernie Innocenti
bernie at codewiz.org
Sat Mar 13 06:05:50 EST 2010
Adding Johan and the Gitorious Google group on cc.
Context: we have a separate Gitorious instance in Kathmandu because
bandwidth to the US is too bad for versioning media-rich educational
activities.
Bryan, I'm not sure what's the proper level to hook in would be, but
maybe we could write a script which dumps the list of projects and
repositories in your instance, and adds whatever is missing to our
instance. If we do it right, repositories would be created automatically
by a separate "task performer" process.
On Sat, 2010-03-13 at 13:10 +0545, Bryan Berry wrote:
> Bernie,
>
> your solution would mean we would have to create each new repo in two
> places, one on g.o.o and another on g.sl.o . Is this understanding
> incorrect?
>
> Since we have 80+ lessons currently and each lesson requires its own
> repo, this will mean a lot of admin time. In the future we should have
> more than a couple hundred lessons, which will cause even more admin
> head aches
>
> Is there any way we could automatically export new repos from g.o.o to g.sl.o?
>
> On Wed, Mar 10, 2010 at 5:18 PM, Bernie Innocenti <bernie at codewiz.org> wrote:
> > On Wed, 2010-03-10 at 10:49 +0545, Bryan Berry wrote:
> >> We have set up our own local instance of gitorious because our
> >> bandwidth to the US sucks. We still need a way to synchronize our work
> >> done on the local instance http://git.olenepal.org w/ g.sl.o
> >>
> >> How can we make this happen?
> >
> > You could write a cron job that would cd to the dir where all the git
> > repositories are, and then do something as simple as:
> >
> > for repo in */*.git; do
> > export GIT_DIR="$repo"
> > git push --mirror --force "gitorious at git.sugarlabs.org:$repo"
> > done
> >
> > Obviously, you'd need to install an ssh key for the user running that
> > script into some "olesync" account in our Gitorious.
> >
> > If you have only some repos to sync, just do it this way:
> >
> > PROJECTS="foo bar baz"
> > for prj in $PROJECTS; do
> > for repo in "$prj/*.git"; do
> > ...
> > done
> > done
> >
> > Ta da'! :-)
> >
> > The pushes should be very cheap. If they are not, try doing "git gc"
> > before each push.
> >
> > --
> > // Bernie Innocenti - http://codewiz.org/
> > \X/ Sugar Labs - http://sugarlabs.org/
> >
> >
>
--
// Bernie Innocenti - http://codewiz.org/
\X/ Sugar Labs - http://sugarlabs.org/
More information about the Systems
mailing list