On 01/07/2011 07:40, George Roldugin wrote:
Hi everyone,

Attached is a patch which adds support for --bare flag to the sync-all
script. Here's how one could use it (assuming the patch is merged in):

$ wget https://raw.github.com/ghc/ghc/master/sync-all
$ wget https://raw.github.com/ghc/ghc/master/packages -O packages.conf
$ chmod +x sync-all
$ ./sync-all --bare -r http://darcs.haskell.org/ get

This would use the same layout as the remote repo, i.e.:
$ find . -name "*.git"
./ghc-tarballs.git
./ghc.git
./haddock.git
./hsc2hs.git
./packages/array.git
./packages/base.git
./packages/binary.git
...

Interesting, as I've just been doing something similar here. I have a local mirror of the GHC repositories, and until recently it was just a plain clone. The problem with that was that I only get the master branch when pulling from the mirror. So I discovered the --mirror option which does the right thing with branches, but requires a bare repo, which doesn't work well with sync-all as you noticed.

My temporary solution is to use a script to pull into the mirror repo tree.

Note that it requires the packages file to operate. However, I renamed
it to packages.conf since it would clash with the packages directory
otherwise. The script would continue working with both packages and
packages.conf, no change to the main repo is required.

To create a true mirror one could do the following:
$ ./sync-all --bare --nofib --dph --extra --testsuite -r
http://darcs.haskell.org/ get
$ ./sync-all config remote.origin.fetch '+refs/heads/*:refs/heads/*'

Now `sync-all fetch` will correctly update the mirror.

Ok, so this is instead of using --mirror. Perhaps sync-all should just support --mirror as well as --bare?

I'll pull in your patch as-is, and if you want to send a follow up to also support --mirror that would be great.

Cheers,
        Simon



Both the sync-all script and the package.conf file have to be updated
manually.

I tried very hard to keep the old functionality intact. Let me know if
you run into any problems.

Regards,
George





_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc


_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to