infra/codestorage/hg-repo-sync
2015-10-14
Parent:cc08c8ed2128
infra/codestorage/hg-repo-sync/run.sh
Remove the hgrc file, fix permissions. When pulling backups, make sure we set the permissions to 0770 as well as change the group they belong to. This caused us to not be able to write changes (oops). Also, remove the hgrc file. Which means our annoying "not trusting file /mounted/repos/blah-blah/.hg/hgrc from untrusted user root, group committers" message is back, but that's a minor nuisance. The real issue is that we're overwriting the hgrc for everything _anyways_ to get the push hook, etc. So there seemed to be little point.
| paddy@0 | 1 #!/bin/bash |
| paddy@0 | 2 |
| paddy@1 | 3 DOPUSH=${PUSH:-"1"} |
| paddy@1 | 4 DOPULL=${PULL:-"1"} |
| paddy@1 | 5 DOSLEEP=${DOSLEEP:-"1"} |
| paddy@0 | 6 |
| paddy@1 | 7 if [ $DOPUSH -eq "1" ]; then |
| paddy@1 | 8 /bin/bash /usr/local/bin/helpers/push.sh |
| paddy@0 | 9 fi |
| paddy@0 | 10 |
| paddy@1 | 11 if [ $DOPULL -eq "1" ]; then |
| paddy@1 | 12 /bin/bash /usr/local/bin/helpers/pull.sh |
| paddy@1 | 13 fi |
| paddy@0 | 14 |
| paddy@1 | 15 if [ $DOSLEEP -eq "1" ]; then |
| paddy@1 | 16 /bin/bash /usr/local/bin/helpers/sleep.sh |
| paddy@1 | 17 fi |