For your consideration PATCH to sync-all script to support bare repos

George Roldugin groldugin at cse.unsw.edu.au
Fri Jul 1 08:40:09 CEST 2011


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
...

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.

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/cvs-ghc/attachments/20110701/a84447be/attachment-0002.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-New-functionality-for-sync-all-to-support-bare-repos.patch
Type: application/octet-stream
Size: 9105 bytes
Desc: not available
URL: <http://www.haskell.org/pipermail/cvs-ghc/attachments/20110701/a84447be/attachment-0001.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/cvs-ghc/attachments/20110701/a84447be/attachment-0003.htm>


More information about the Cvs-ghc mailing list